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

Home » Public Forums » archive » Re: Multiple values from a function?
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: Multiple values from a function? [message #20562] Wed, 05 July 2000 00:00 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Craig Markwardt wrote:
>
> "J.D. Smith" <jdsmith@astro.cornell.edu> writes:
>>
>> void=routine_names('a',STORE=-1,val)
>>
>> Lions and tigers and bears, oh my!
>
> Pay no attention to the man behind the curtain! I still say this
> doesn't work for most cases, at least under Unix. The following is a
> simple transcript to test thes, which shows how ROUTINE_NAMES crashes
> when A is undefined, but works when A is defined. In every case that
> I tried (as noted below), the variable A needs to be defined at the
> calling level *first* before ROUTINE_NAMES(STORE=) will work.
>
> It could be that this works under v5.3, or on Windows. I don't know
> since we don't have those versions around here.
>
> Craig
>
> IDL> .run
> pro testset, name
> void = routine_names(name,store=-1,findgen(10))
> end
> % Compiled module: TESTSET.
>
> IDL> testset, 'a' ;; A is undefined here, and it doesn't work
> % ROUTINE_NAMES: Variable is undefined: a.
> % Execution halted at: TESTSET 2 /dev/tty
> % $MAIN$
> IDL> retall
> IDL> a = 1
> IDL> testset, 'a' ;; Now A is defined and it works.
> IDL> help, a
> A FLOAT = Array[10]
>
> IDL> print, !version
> { x86 linux unix 5.2.1 Jun 4 1999}
> { alpha OSF unix 5.2 Oct 30 1998}
> { x86 linux unix 5.1 Apr 13 1998}
> { alpha OSF unix 5.0 Apr 28 1997}
> { alpha OSF unix 4.0.1}

IDL> testset,'a'
IDL> print,a
0.00000 1.00000 2.00000 3.00000 4.00000 5.00000
6.00000 7.00000 8.00000 9.00000
IDL> print,!VERSION
{ x86 linux unix 5.3 Nov 11 1999}

You just need the new magic wand, version 5.3.

JD

--
J.D. Smith /*\ WORK: (607) 255-6263
Cornell University Dept. of Astronomy \*/ (607) 255-5842
304 Space Sciences Bldg. /*\ FAX: (607) 255-5875
Ithaca, NY 14853 \*/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Vertices and Polygons
Next Topic: Impressions on IDL for Macintosh?

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

Current Time: Fri Oct 10 13:13:27 PDT 2025

Total time taken to generate the page: 0.16155 seconds