× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Multiple parms to procedures
  • From: Hans Boldt <boldt@xxxxxxxxxx>
  • Date: Fri, 17 Jul 1998 14:43:29 -0400


David wrote:
>I agree with %parms.  I forgot to mention it.  You ask "why complicate
>things?"  You cannot use %ADDR for CONST/VALUE parameters.  I use CONST
>wherever possible because of the ability to pass an expression LIKE %SUBST.
>If %ADDR worked for CONST/VALUE parms I would use it.  Could you allow IF
>%ADDR(Parm1) = *NULL for CONST parms?  You know that Parm1 is not a
>procedure and *NULL is totally innocuous.  Ideally I would like to see
>CONST/VALUE parms protected as if they had a debug WATCH ensuring thay are
>not changed rather than having the compiler evaluate source statements.

OK, you got me!  Silly me - I read the RPG Reference and trusted
what it said! :-)

The joker in the bunch is the CONST OPTIONS(*OMIT) parameter.  You
can't test if it's passed or not without using an API.  At the very
least, we'll have to update the manual.

I'm going to propose a simple enhancement to my colleagues:  We should
have a built-in function called %PASSED(parm-name) that tells you if
a parameter is passed or not and it should work for both OPTIONS(*OMIT)
and OPTIONS(*NOPASS) parameters.  This would have to be easier to
implement than making the special case %ADDR(P)=*NULL work for CONST
parms.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.