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 #78986] Sat, 14 January 2012 11:26 Go to previous message
Russell[1] is currently offline  Russell[1]
Messages: 101
Registered: August 2011
Senior Member
It's ugly, but it's doable....

Presumably, you have some code that will call some other code which
has an unknown number of inputs (and possibly outputs), making it
impossible to elegantly write it ahead of time. However, the first
code must know what number of inputs and outputs that code 2 should
have, so why not just write code 2 in real-time. So store your code
as a string (or even read it from an ascii file) and write it out to
be compiled with "resolve_routine" and called by "call_procedure" or
"call_function". You could use "execute", but that'll be a mess if
you decide to use the IDL Virtual Machine.

Russell


On Jan 12, 2:34 pm, PMan <bloodysam.v...@gmail.com> 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.
[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: Wed Oct 08 17:35:27 PDT 2025

Total time taken to generate the page: 0.00398 seconds