On 4/17/2012 5:00 AM, Gavin Fung wrote:
I'm doing some RPG programs' development and I found that some of
these RPG require more input parameters from their caller (e.g. a CL
program), I feel confuse that they still working even the number of
the parameters are not match, for example, RPG A has 5 input
parameter and its caller CL B only gives it 3.

Unless you're using prototyped calls (which is the recommended technique), there is no way for the compiler to enforce the correct number of parameters on a call.

As such, you can call a program with as many (or as few) parameters as you want.

You'll encounter an RNQ0222 error if you try to access a parameter that is unpassed within the called program.


This thread ...


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

This mailing list archive is Copyright 1997-2020 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].