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 #20564 is a reply to message #20562] Wed, 05 July 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"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}


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Sat Oct 11 13:45:37 PDT 2025

Total time taken to generate the page: 1.35919 seconds