* simple example with 3 functions function bar storage var word types MONDAY constant TUESDAY constant WEDNESDAY constant THURSDAY constant FRIDAY constant SATURDAY constant SUNDAY constant mystruct struct var long var2 long end mystruct2 struct var word end linkage retcode uword procedure returning retcode set retcode to SATURDAY display "bar has now changed the retcode to " SATURDAY function foo storage linkage param uword param2 uword retcode uword procedure with param param2 returning retcode set retcode to 12 display "hi from foo! param is " param ", param2 is " param2 ", assigning retcode to " retcode set param to 90 set param2 to 60 display "now, param is " param ", param2 is " param2 call bar returning retcode display "bar returned " retcode function main public globals storage myparam uword myparam2 uword myret uword procedure set myret to size of word display "myret is " myret set myret to 100 set myparam to 300 set myparam2 to 400 display "calling foo, myparam is " myparam ", myparam2 is " myparam2 ", myret is " myret call foo with myparam myparam2 display "foo in turn returned " myret