-----Ursprungligt meddelande----- Från: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] För Paul Gilmartin Skickat: den 20 mars 2012 15:45 Till: IBM-MAIN@bama.ua.edu Ämne: Re: SV: Theology question
On Tue, 20 Mar 2012 10:54:50 +0100, Thomas Berg wrote: >The only alternative (as seen from the principle of least astonishment) I can >think of is using the explicit option "NULL" - assuming that value is never a >"real" option. > In some contexts, such an option is unjustified. Designs should attempt not to restrict value spaces. >BTW, In rexx if you check for an existing parm would "rexxfunc(arg1,,arg3)" >have a *non-existing* arg/parm nr 2 but "rexxfunc(arg1,'',arg3)" would have >and *existing*, but "empty" arg/parm nr 2. > Empirically, yes: 5 *-* trace R 7 *-* Junk = rexxfunc(arg1,,arg3) 13 *-* rexxfunc: 14 *-* return( arg( 2, 'Exists' ) ) >>> "0" >>> "0" 8 *-* Junk = rexxfunc(arg1,'',arg3) 13 *-* rexxfunc: 14 *-* return( arg( 2, 'Exists' ) ) >>> "1" >>> "1" 9 *-* junk = arg( 1, ) >>> "" 10 *-* junk = arg( 1, '' ) 10 +++ junk = arg( 1, '' ) IRX0040I Error running ./fooargs, line 10: Incorrect call to routine Since you ask the question, I checked the doc at: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj4a3a0/4.3.4 I can see that it doesn't make this explicitly clear in the examples given. Is an RCF merited? *** I knew this, it wasn't meant to be a question. Although the "Arg(2,'e')" etc examples hints it quite clear it doesn't points out that an "empty" option like '' or a variable that was set = '' is still an existing option. Which could be a surprise for a beginner in rexx programming. So Yes, a RCF could be motivated. Regards, Thomas Berg ______________________________________________________ Thomas Berg Specialist AM/DQS SWEDBANK AB (publ) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN