On 05.09.2020 21:48, Mike Cowlishaw wrote:


Rony, this was added to NetRexx back in the 1990s.   

yes, this also meant that translating NetRexx to Java would be
straight-forward, but NetRexx broke compatibility with Rexx in that respect
(which has not been a problem). 

 

I don't follow .. the shortcircuit in NetRexx uses a comma in a place that
was not allowed/possible in Rexx: 

Multiple expressions, separated by commas, can be given on the if clause,
which then has the syntax: 




if expression[, expression]... [;] 

In this case, the expressions are evaluated in turn from left to right, and
if the result of any evaluation is 1 then the test has succeeded and the
instruction following the associated then clause is executed. If all the
expressions evaluate to 0 and an else was given then the instruction after
the else is executed. 

Note that once an expression evaluation has resulted in 1, no further
expressions in the clause are evaluated. So, for example, in: 

   -- assume 'name' is a string 
   if name=null, name='' then say 'Empty' 

then if name does not refer to an object it will compare equal to null and
the say instruction will be executed without evaluating the second
expression in the if clause. 

How does that break compatibility with Rexx?

Mike

 

 

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to