====== Getting started with Tcl: example 4 ====== This page is part of the Airplug documentation related to Tcl/Tk.\\ [[en:doc:pub:tcltk:start|Back to the Tcl/Tk documentation page]] / [[en:doc:summary|Back to the Airplug documentation page]] ===== Using Tcl functions ===== ==== Script ==== #!/usr/bin/tclsh # Using Tcl functions. set Number 5 set MyString "I love Paris" set l [string length $MyString] puts stdout "MyString length is $l" set pi [expr 2 * asin(1.0)] puts stdout "pi ~= $pi" set x 5 set y 6 puts stdout "$x + $y = [expr $x + $y]" # { vs. " puts stdout {$x + $y = [expr $x + $y]} ==== Output ==== MyString length is 12 pi ~= 3.14159265359 5 + 6 = 11 $x + $y = [expr $x + $y]
---- This page is part of the Airplug documentation related to Tcl/Tk.\\ [[en:doc:pub:tcltk:start|Back to the Tcl/Tk documentation page]] / [[en:doc:summary|Back to the Airplug documentation page]]