× 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.



The fact of the method is that the developer makes the wrong assumption of
thinking that "If I did not pass it, then the address must be null". In the
RPG reference manual, it gives a clear example of using %parms() to check
number of parameter and handle accordingly.

By complianting that manual didn't say I can't use %addr to check if param
is passed is like my older one saying to me that "You told me not to hit
Jessica, but you never say I can't pull her hair"... :)....

But I must say that the assumption is a good and logic assumption and it
will not hurt to state in the manual that %addr should not be use to check
if parm is passed...





"Charles Wilt" <charles.wilt@xxxxxxxxx> wrote in message
news:mailman.33299.1299703376.2702.rpg400-l@xxxxxxxxxxxx...
+1 ... lol ...

My guess is that Paul is simply looking for the someplace he can point
to and say, "see here's where it's documented" rather than saying
"Barbara told me" when he runs across another developer using %addr()
with a *NOPASS parameter.

In other words, if you know that %addr() is used to check for *OMITted
parms, where in the manual does it say that it doesn't work for
*NOPASSed parms.

I don't know that it's spelled out in quite that easy to understand
format...

The ILE RPG Programmers guide says
-Omitting Parameters
--Passing *OMIT
---To determine if *OMIT has been passed to an ILE RPG procedure, use
the %ADDR built-in function to check the address of the parameter in
question.
--Leaving Out Parameters
----<nothing here>
-Checking for the Number of Passed Parameters
--%PARMS does not take any parameters. The value returned by %PARMS
also includes any parameters for which *OMIT has been passed.

For a developing working from just the manuals, you have to read
between the lines and infer that %parms() must be used with *NOPASS.

Charles


On Wed, Mar 9, 2011 at 2:00 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
wrote:
(do you really think you know more about this
than the lead developer of the RPG compiler?!)



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.