PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-15/SWIG/Examples/tcl/multimap/example.tcl

#
TCL | 25 lines | 11 code | 8 blank | 6 comment | 0 complexity | ff63c2216527164e82cbc670ac46a774 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # file: example.tcl
  2. # Try to load as a dynamic module.
  3. catch { load ./example.so example}
  4. catch { load ./example.dll example} ;# Windows
  5. # Call our gcd() function
  6. set x 42
  7. set y 105
  8. set g [gcd $x $y]
  9. puts "The gcd of $x and $y is $g"
  10. # call the gcdmain
  11. gcdmain "gcdmain 42 105"
  12. # call count
  13. set c [count "Hello World" l]
  14. puts $c
  15. # call capitalize
  16. set c [capitalize "helloworld"]
  17. puts $c