/trunk/Examples/tcl/contract/runme.tcl
TCL | 22 lines | 8 code | 7 blank | 7 comment | 0 complexity | c31613e9d548fccabde37a9f938c5bc0 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- # file: runme.tcl
- # Try to load as a dynamic module.
- catch { load ./example[info sharedlibextension] example}
- # Call our gcd() function
- set x 42
- set y 105
- set g [gcd $x $y]
- puts "The gcd of $x and $y is $g"
- # Manipulate the Foo global variable
- # Output its current value
- puts "Foo = $Foo"
- # Change its value
- set Foo 3.1415926
- # See if the change took effect
- puts "Foo = $Foo"