1 # example program: creating and using global variables
 2 
 3 def main [
 4   # allocate 5 locations for globals
 5   global-space:space <- new location:type, 5
 6   # read to globals by using /space:global
 7   1:num/space:global <- copy 3
 8   foo
 9 ]
10 
11 def foo [
12   # ditto for writing to globals
13   $print 1:num/space:global, 10/newline
14 ]