passing parameters on to other functions [message #8772] |
Tue, 22 April 1997 00:00  |
bandari
Messages: 2 Registered: September 1996
|
Junior Member |
|
|
Hi:
I want to pass the parameters that have been sent to
a function directly to another function or procedure. The difficulty
is that there may be optional keywords and optional functions that are
also needed to be passed on.
One obvious option would be to use a series of nested ifs, but
this can get messy as the number of optional parameters increase. I
have also resorted to using the 'execute command', but there just must
be a cleaner way of handling this issue. Any ideas anyone?
I was thinking, for instance, that if there was a way of setting
undefined keywords/parameters to something that is still undefined,
without idl complainning, then all one has to do is pass ll the parameters
to the next function (undefined parameters will still remain undefined and
everybody will be happy. Thanks in advance for all the help.
--- Esfandiar
--
Esfandiar B. Bandari, Ph.D. email: bandari@mda.ca
MacDonald Dettwiler and Assoc. tele: o. (604) 231-2374
13800 Commerce Parkway h. (604) 926-4839
Richmond, B.C. V6V 2J3 fax: (604) 278-2117
|
|
|
Re: passing parameters on to other functions [message #8878 is a reply to message #8772] |
Thu, 01 May 1997 00:00  |
Robert Moss
Messages: 74 Registered: February 1996
|
Member |
|
|
Esfandiar Bandari wrote:
>
> Hi:
> I want to pass the parameters that have been sent to
> a function directly to another function or procedure. The difficulty
> is that there may be optional keywords and optional functions that are
> also needed to be passed on.
>
> One obvious option would be to use a series of nested ifs, but
> this can get messy as the number of optional parameters increase. I
> have also resorted to using the 'execute command', but there just must
> be a cleaner way of handling this issue. Any ideas anyone?
>
> I was thinking, for instance, that if there was a way of setting
> undefined keywords/parameters to something that is still undefined,
> without idl complainning, then all one has to do is pass ll the parameters
> to the next function (undefined parameters will still remain undefined and
> everybody will be happy. Thanks in advance for all the help.
>
> --- Esfandiar
>
>
> --
> Esfandiar B. Bandari, Ph.D. email: bandari@mda.ca
> MacDonald Dettwiler and Assoc. tele: o. (604) 231-2374
> 13800 Commerce Parkway h. (604) 926-4839
> Richmond, B.C. V6V 2J3 fax: (604) 278-2117
There is already a builtin mechanism to handle this called keyword
inheritance. Look up the EXTRA keyword in your online help for more
details. It's custom made for just your problem.
--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
|
|
|