PageRenderTime 29ms CodeModel.GetById 23ms app.highlight 5ms RepoModel.GetById 0ms 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
 3catch { load ./example[info sharedlibextension] example}
 4
 5# ----- Object creation -----
 6
 7# Print out the value of some enums
 8puts "*** color ***"
 9puts "    RED    = $RED"
10puts "    BLUE   = $BLUE"
11puts "    GREEN  = $GREEN"
12
13puts "\n*** Foo::speed ***"
14puts "    Foo_IMPULSE   = $Foo_IMPULSE"
15puts "    Foo_WARP      = $Foo_WARP"
16puts "    Foo_LUDICROUS = $Foo_LUDICROUS"
17
18
19puts "\nTesting use of enums with functions\n"
20
21enum_test $RED   $Foo_IMPULSE
22enum_test $BLUE  $Foo_WARP
23enum_test $GREEN $Foo_LUDICROUS
24enum_test 1234   5678
25
26puts "\nTesting use of enum with class method"
27Foo f
28
29f enum_test $Foo_IMPULSE
30f enum_test $Foo_WARP
31f enum_test $Foo_LUDICROUS
32