This page is part of the Airplug documentation related to Tcl/Tk.
Back to the Tcl/Tk documentation page /
Back to the Airplug documentation page
#!/usr/bin/tclsh set str "hello, world" puts stdout "str = $str" puts stdout "The length of \"$str\" is [string length $str]" proc display_length { s } { puts stdout " the length of \"$s\" is [string length $s]" } proc display_length_upvar { s } { upvar $s localstr puts stdout " the length of \"$localstr\" is [string length $localstr]" } puts stdout "" puts stdout "Calling display_length str" display_length str puts stdout "Calling display_length_upvar str" display_length_upvar str
str = hello, world The length of "hello, world" is 12 Calling display_length str the length of "str" is 3 Calling display_length_upvar str the length of "hello, world" is 12
<br/>
This page is part of the Airplug documentation related to Tcl/Tk.
Back to the Tcl/Tk documentation page /
Back to the Airplug documentation page