On Tue, 21 Feb 2023 11:56:43 -0600, Hobart Spitz wrote:
>    ...
>I prefer CALL LISTDSI "SYSUT1 FILE", which is almost the same as RESULT =
>LISTDSI("SYSUT1 FILE").  IMHO, these examples in IBM documentation are
>misleading and potentially can result in broken code.  A CALLed routine is
>NOT required to return a value and whereas a function invocation MUST have
>a value on it's return statement.  If you change a routine from returning a
>value, to not returning one, you will get a run time syntax error.
>
I consider this valuable enforcement lest I carelessly add a RETURN lacking
a value to a function.

After a CALL, SYMBOL( 'RESULT' )=='LIT' tells me that no value was returned.
I have never exploited this by coding a routine which only sometimes returns a
value.  I have never relied on being able to cause an intentional syntax error 
by not
returning a value.

>Further, you are adding another variable to the B-tree, while you could
>just reuse RESULT.  If garbage collections are an issue, they might be
>slightly more frequent.
>
I believe that if only test a function result (IF WORDS( S ) >> 3) it adds 
nothing
to the B-tree.  I may be wrong.

Is the REXX storage management documented for a particular implementation
or even in the ANSI standard?  IIRC, I saw some IBM documentation which I
can no no longer find that DROPping a stem reclaims storage; DROPping 
individual members does not.  I can demonstrate empirically that DROPping
individual members of a compound can increase the storage required.

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to