aboutsummaryrefslogtreecommitdiff
path: root/Examples/tcl/simple/runme.tcl
blob: c021a9907e0e9bfedc1bab0aeb1d352f2a1ded7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"