PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/tcl/contract/runme.tcl

#
TCL | 22 lines | 8 code | 7 blank | 7 comment | 0 complexity | c31613e9d548fccabde37a9f938c5bc0 MD5 | raw file
 1# file: runme.tcl
 2# Try to load as a dynamic module.
 3
 4catch { load ./example[info sharedlibextension] example}
 5
 6# Call our gcd() function
 7set x 42
 8set y 105
 9set g [gcd $x $y]
10puts "The gcd of $x and $y is $g"
11
12# Manipulate the Foo global variable
13
14# Output its current value
15puts "Foo = $Foo"
16
17# Change its value
18set Foo 3.1415926
19
20# See if the change took effect
21puts "Foo = $Foo"
22