comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Creating procedure with arbitrary number of input parameters
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Creating procedure with arbitrary number of input parameters [message #78997 is a reply to message #78991] Thu, 12 January 2012 12:30 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 1/12/12 12:58 PM, PMan wrote:
> On Jan 12, 2:36 pm, Michael Galloy<mgal...@gmail.com> wrote:
>> On 1/12/12 12:34 PM, PMan wrote:
>>
>>> I am trying to created a procedure with an arbitrary number of input
>>> parameters that will be determined at run time. There does seem to be
>>> a mechanism to do this in IDL. For example, in the STRING function:
>>
>>> Syntax
>>> Result = STRING( Expression1, ..., Expressionn, ....
>>
>>> can handle N input parameters. However, I cannot find any documents or
>>> references showing how to implement this.
>>
>>> Does any one here know how this can be achieved?
>>
>>> Thank you for your attention.
>>
>> It can be done in C as a DLM.
>>
>> Mike
>> --
>> Michael Galloywww.michaelgalloy.com
>> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
>> Research Mathematician
>> Tech-X Corporation
>
> Ah, I see. Time for plan B. Thank you for your quick answer.

Of course, you can fake this by making your routine have 10 arguments
(or whatever number you don't think the user will ever exceed) and a
CASE statement. Ugly, but gets the job done usually.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Multiple parameters for ZEROFCN
Next Topic: Multiple parameters for ZEROFCN

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:23:19 PDT 2025

Total time taken to generate the page: 1.20404 seconds