; test that #<_value> is accessible and is 0 ; test for proper initialization of #<_value> if program is re-run ; see note at end of program # = 0 (debug,line #<_line>: _value: - expected #, got #<_value>) o200 if [#<_value> NE 0] (debug, fail: _value=#<_value> - expecting 0) o200 endif o1000 sub o1010 if [#1 GT 0] o1010 return [123*[#1]] o1010 endif o1020 if [#1 LT 0] o1020 return o1020 endif o1000 endsub [4712] ; test returning value via 'return' # = 2 # = 246 o1000 call [#] (debug,line #<_line>: call with arg1=# expect #, got #<_value>) o3000 if [#<_value> NE #] (debug,line #<_line>: 'return' return value=#<_value> - expected #) o3000 endif ; test returning no value at all - plain old style 'return' # = -1 # = 0 o1000 call [#] (debug,line #<_line>: call with arg1=# expect #, got #<_value>) o4000 if [#<_value> NE #] (debug,line #<_line>: 'plain return' return value=#<_value> - expected #) o4000 endif ; test returning value via 'endsub' # = 0 # = 4712 o1000 call [#] (debug,line #<_line>: call with arg1=# expect #, got #<_value>) o2000 if [#<_value> NE #] (debug,line #<_line>: 'endsub' return value=#<_value> - expected #) o2000 endif ; note #<_value> is 4712 at this point. (debug,line #<_line>: _value=#<_value> - expected #) m2