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

Home » Public Forums » archive » Procedures with variable/dynamic argument list??
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: Procedures with variable/dynamic argument list?? [message #89951 is a reply to message #73106] Thu, 08 January 2015 12:27 Go to previous message
pgerakines is currently offline  pgerakines
Messages: 1
Registered: January 2015
Junior Member
It's not exactly what you're asking for, but recently I've discovered this is possible with the new LIST variable type.

You can pass a LIST variable to your procedure, where each element is one of the arguments in the "usual type" of procedure/function call. You can then determine the number of elements in the LIST that was passed using the list::count function method.

So you can call the procedure with any number of arguments, as long as you package them into a LIST first.

> myprocedure, LIST(x1,x2,x3,x4,x5,x6)
> myprocedure, LIST(x1,x2,x3)

where

PRO my_procedure, x
n = x.count()
x1 = x[0]
x2 = x[1]
; etc.
END
[Message index]
 
Read Message
Read Message
Previous Topic: IDL and Mac Retina Displays
Next Topic: object graphics and IDL >= 8.2

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

Current Time: Fri Oct 10 10:07:40 PDT 2025

Total time taken to generate the page: 0.39907 seconds