>   * expressions implicitly returning a value: if a RexxBlock only consists of 
> an expression, then
>     the result of the expression will be returned, e.g. 
> "12"~times({arg(1)/2}) which is the same
>     as "12"~times({return arg(1)/2}). This is probably intentional, still 
> thinking whether I like
>     it or not (the return-keyword statement is one that every Rexx programmer 
> is accustomed to and
>     that explicitly documents what the code is supposed to do; not having a 
> return keyword
>     statement should cause a runtime error if a result is expected; the 
> implicit return is
>     probably not really "Rexxish", although neat in this particular context, 
> which is probably
>     restricted to RexxBlocks?).
>
Thinking about this, the reason for this is probably that "OPTIONS NOCOMMANDS" 
is the default option
for your version of the interpreter. As you document, when this option is in 
effect, a standalone
expression result/string will be assigned to the variable RESULT.

Here in addition an implicit return seems to be implied? If so, why not have an 
option like
RETURN_RESULT which will imply NOCOMMANDS and have that option injected into 
the block to be
executed (like you do already with 'use arg value, index" and the like) ? Then 
the current behaviour
for blocks is well defined, but the compatibility with existing Rexx programs 
(which need to have
"option commands' by default in effect) is not jeopardized?

---rony

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to