PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. # file: runme.tcl
  2. # Try to load as a dynamic module.
  3. catch { load ./example[info sharedlibextension] example}
  4. # Call our gcd() function
  5. set x 42
  6. set y 105
  7. set g [gcd $x $y]
  8. puts "The gcd of $x and $y is $g"
  9. # Manipulate the Foo global variable
  10. # Output its current value
  11. puts "Foo = $Foo"
  12. # Change its value
  13. set Foo 3.1415926
  14. # See if the change took effect
  15. puts "Foo = $Foo"