PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/tcl/constants/runme.tcl

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