|
I mean if we are checking number of passed parameter in a procedure
that in not a main procedure then %Parm in this procedure will not
show the correct value of the passed parameter. But if you are passing
parameter to that procedure then it will work. but %Parm will show you
the number of local parameter, not the global one passed in the
program.
Within restrictions noted by Simon, that's basically true.
Having said that, it is very rare (for me) to need to know within a
procedure how many parameters were passed to the program; I just don't code
that way (anymore). I think "Service Program," and count the parameters
that are passed to the procedure. If I really, really needed the number of
program parameters, I suppose I could reference psdsParmCount (which is my
standard Program Status Data Structure name for Parameter Count to the
program). But one would have to be careful, because THAT won't work if the
procedure is in a service program.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I would rather men should ask why no statue has been erected in my honor,
than why one has."
-- Marcus Cato (2nd century BC)"It is better to deserve honors and
not have them than to have them and not deserve them."
-- Mark Twain
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.