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

Home » Public Forums » archive » Ellipsis in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Ellipsis in IDL? [message #40122] Wed, 21 July 2004 15:58 Go to next message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
How do you define a procedure to take N number of arguments when you
don't know what N is before the procedure call? For those of you who
have worked with C, what I'm after is something similar to the ellipsis
(...) which allows N many arguments to be specified for functions such
as printf.

In IDL, the print command is obvious example of what I'm trying to do.
The signature of print is:

print [, Expr1, Expr2, ... , ExprN]

So, how can I write a procedure to take N many arguments?

-Mike
Re: Ellipsis in IDL? [message #40259 is a reply to message #40122] Fri, 30 July 2004 17:25 Go to previous message
Evan Fishbein is currently offline  Evan Fishbein
Messages: 4
Registered: May 1999
Junior Member
I don't think I have used it with more than 30 arguments, but when you
write code to write code there is not limit to the size of the code
that can be written. I was curious if you could actually pass 1024
arguments to a routine without an exception or buffer overflow and you
can. By the way, I use this routine as part of some general routines
that create hdf files and excel spreadsheets which an undetermined at
compilation numbers of columns.

David Fanning wrote:
> Craig Markwardt writes:
>
>
>> Fascinating. I thought that the number of positional parameters was
>> limited to 64. That limit must have been lifted?
>
>
> Don't ask me. The largest number of positional parameters I've ever
> used is three. More than that, and my memory gets cloudy. :-(
>
> Cheers,
>
> David
Re: Ellipsis in IDL? [message #40266 is a reply to message #40122] Thu, 29 July 2004 21:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Craig Markwardt writes:

> Fascinating. I thought that the number of positional parameters was
> limited to 64. That limit must have been lifted?

Don't ask me. The largest number of positional parameters I've ever
used is three. More than that, and my memory gets cloudy. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Ellipsis in IDL? [message #40267 is a reply to message #40122] Thu, 29 July 2004 20:23 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Evan Fishbein <Evan.Fishbein@jpl.nasa.gov> writes:
> This is a multi-part message in MIME format.
> --------------000809020709000301000907
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
>
> About 1/2 year ago I asked RSI to include this capability. If enough
> people ask, I am sure they will comply. As for the suggestion about
> puttomh a list of arguments into a ptr array and using a case statement
> to processess the argument list I once wrote program that wrote a
> progam to put an argument list with up to 1024 arguments into a ptr
> array. It is attached.

Fascinating. I thought that the number of positional parameters was
limited to 64. That limit must have been lifted?

Craig
Re: Ellipsis in IDL? [message #40268 is a reply to message #40122] Thu, 29 July 2004 18:49 Go to previous message
Evan Fishbein is currently offline  Evan Fishbein
Messages: 4
Registered: May 1999
Junior Member
About 1/2 year ago I asked RSI to include this capability. If enough
people ask, I am sure they will comply. As for the suggestion about
puttomh a list of arguments into a ptr array and using a case statement
to processess the argument list I once wrote program that wrote a
progam to put an argument list with up to 1024 arguments into a ptr
array. It is attached.

Michael Wallace wrote:
> How do you define a procedure to take N number of arguments when you
> don't know what N is before the procedure call? For those of you who
> have worked with C, what I'm after is something similar to the ellipsis
> (...) which allows N many arguments to be specified for functions such
> as printf.
>
> In IDL, the print command is obvious example of what I'm trying to do.
> The signature of print is:
>
> print [, Expr1, Expr2, ... , ExprN]
>
> So, how can I write a procedure to take N many arguments?
>
> -Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: red hat and colors
Next Topic: % FINDFILE: Error managing child process.

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

Current Time: Fri Oct 10 05:25:10 PDT 2025

Total time taken to generate the page: 0.40132 seconds