On 01/08/2008, at 2:13 AM, Adam Glauser wrote:

If you add a *NOPASS parameter to a procedure interface, you technically
only need to rebind the callers that use the new parameter. I'm not
sure what would happen if you removed a parameter without rebinding the
callers.

If you add a new parameter you MUST make it optional unless you are prepared to modify all callers and recompile.

If you add a new parameter and it is optional then you only need to rebind those callers that use the new parameter.

If you remove a parameter from a procedure that is currently passed by a caller nothing bad will happen. It will be put on the stack and made available but the receiving procedure will ignore it. Subsequent maintenance programmers might become confused but the prototype will catch the extra parameter when they compile and it can be removed at that time. (Still better to remove the parameter from all callers at the same time as you modify the receiver.)

If you make a previously required parameter optional then you need to ensure the procedure correctly handles it when not supplied but you do not have to rebind or recompile any callers.

If you make a given parameter optional then ALL parameters that follow it must also be optional.

If you want a new parameter to be required and still allow previous parameters to be "not supplied" then you must make those previous parameters omissable. Optional and omissable are not the same thing nor are they mutually exclusive.


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




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.