PageRenderTime 131ms CodeModel.GetById 28ms RepoModel.GetById 3ms app.codeStats 0ms

/tags/Root-branch-php-utl/SWIG/Examples/tcl/enum/runme.tcl

#
TCL | 32 lines | 19 code | 10 blank | 3 comment | 0 complexity | fe16b9a74118fb059bbd0c455d0a63ad MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # file: runme.tcl
  2. catch { load ./example[info sharedlibextension] example}
  3. # ----- Object creation -----
  4. # Print out the value of some enums
  5. puts "*** color ***"
  6. puts " RED = $RED"
  7. puts " BLUE = $BLUE"
  8. puts " GREEN = $GREEN"
  9. puts "\n*** Foo::speed ***"
  10. puts " Foo_IMPULSE = $Foo_IMPULSE"
  11. puts " Foo_WARP = $Foo_WARP"
  12. puts " Foo_LUDICROUS = $Foo_LUDICROUS"
  13. puts "\nTesting use of enums with functions\n"
  14. enum_test $RED $Foo_IMPULSE
  15. enum_test $BLUE $Foo_WARP
  16. enum_test $GREEN $Foo_LUDICROUS
  17. enum_test 1234 5678
  18. puts "\nTesting use of enum with class method"
  19. Foo f
  20. f enum_test $Foo_IMPULSE
  21. f enum_test $Foo_WARP
  22. f enum_test $Foo_LUDICROUS