I expected:
    "return \value failed"
from the following program but instead got
   "test() failed"
because I expected the expression
   return \value
to fail (without returning) when value is &null.
Why did I get the results that I got?
What is special about the expression "return expr"?


procedure main()
   local result
   result := test() | "test() failed"
   write(image(result)) # <-- this line writes "test() failed"to 
standard output
end
procedure test()
   local value
   value := table(&null)[1]
   write(image(value)) # <-- this line writes "&null" to standard output
   return \value  # <-- this line causes test() to fail
   return "return \\value failed" # <-- this line is never reached even 
though \value fails
end


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to