On 2022-07-13 04:46:47 Rony G. Flatscher wrote: > 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
I agree; I don't see why the .stem variant should be easier than any other, especially since stems are hardly ever used with the more modern rexx constructs (e.g. loop x over y). Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 x86_64 Open Object Rexx Version 5.0.0 r12286 Build date: Aug 12 2021 Addressing mode: 64 _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel