While working more and more with "address...with" there is one observation: if not using stems for
output one must place separate statements to create the collection objects (usually arrays) for
output and error.
E.g. using stems:
ADDRESS SYSTEM some_command WITH OUTPUT stem stemOut. ERROR stem stemErr.
whereas using an array instead one must code:
arrOut=.array~new
arrErr=.array~new
ADDRESS SYSTEM some_command WITH OUTPUT USING (arrOut) ERROR USING (arrErr)
The stem solution implicitly creates the stem objects alleviating the programmer from having to
supply two additional statements that create the stem objects.
In all other cases one must create the array objects excplicitly and use a different syntax with the
option USING and having the variable in parentheses.
It would be great if it was possible to use the stem syntax for all collection objects at least for
arrays, such that one could state:
ADDRESS SYSTEM some_command WITH OUTPUT array arrOut ERROR array arr Err
So the token following OUTPUT or ERROR would denote the class of the variable that follows. If the
variable does not exist, then it gets created using the denoted class.
What do you think?
---rony
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel