import source from 1.3.40
[external/swig.git] / Examples / tcl / constants / runme.tcl
1 # file: runme.tcl
2
3 catch { load ./example[info sharedlibextension] example}
4
5 puts "ICONST  = $ICONST (should be 42)"
6 puts "FCONST  = $FCONST (should be 2.1828)"
7 puts "CCONS T = $CCONST (should be 'x')"
8 puts "CCONST2 = $CCONST2 (this should be on a separate line)"
9 puts "SCONST  = $SCONST (should be 'Hello World')"
10 puts "SCONST2 = $SCONST2 (should be '\"Hello World\"')" 
11 puts "EXPR    = $EXPR (should be 48.5484)"
12 puts "iconst  = $iconst (should be 37)"
13 puts "fconst  = $fconst (should be 3.14)"
14
15 if { [catch {
16     puts "EXTERN = $EXTERN (Arg! This shouldn't print anything)"
17 }]} {
18     puts "EXTERN isn't defined (good)"
19 }
20
21 if { [catch {
22     puts "FOO    = $FOO (Arg! This shouldn't print anything)"
23 }]} {
24     puts "FOO isn't defined (good)"
25 }
26