Skip to content

Instantly share code, notes, and snippets.

@kearnh
Created September 13, 2011 15:15
Show Gist options
  • Save kearnh/1214078 to your computer and use it in GitHub Desktop.
Save kearnh/1214078 to your computer and use it in GitHub Desktop.
A file used to test TagmaDebugger.
# FIXME add external package, and then call into package
proc qux {} {
set s 0
for {set i 0} {$i < 3} {incr i} {
set m [expr 2*$i]
incr s $m
}
return $s
}
proc baz {x} {
set y 5
return [expr $x-$y+[qux]]
}
proc bar {x} {
return [baz $x]
}
proc foo {x} {
return [expr {[bar [expr $x+1]] + [bar $x]}]
}
set x [foo 2]
puts [string repeat [foo 1] $x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment