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

Home » Public Forums » archive » Re: IDL- variable variable names
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: IDL- variable variable names [message #7376 is a reply to message #7375] Thu, 07 November 1996 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hendrik Roepcke <alpha@jungle.toppoint.de> writes:

> i want to play with IDL Variable names.....Look:

> a=10
> b="a"
> c=print,MAGIC("b")
> if c eq 10 then print," its magic!"
>
> So: How to programm this function MAGIC????

This looks like deja vu all over again. Here is the
answer: Ain't no way, no how!

But..., I got about this close:

FUNCTION MAGIC, file
number = 0
ok = EXECUTE(file + ' = 0')
RESTORE, file
RETURN, number
END

IDL> a = 10
IDL> number = a
IDL> Save, a, number, Filename='a'
IDL> b = 'a'
IDL> c = Magic(b)
IDL> IF c EQ 10 THEN Print, "It's magic!"

It's magic!

David

*************************************************
* David Fanning, Ph.D.
* 2642 Bradbury Court, Fort Collins, CO 80521
* Phone: 970-221-0438 Fax: 970-221-4762
* E-Mail: davidf@dfanning.com
*
* Sometimes I go about pitying myself, and all along my
* soul is being blown by great winds across the sky.
* -- Ojibway saying
************************************************
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Plotting the terminator on a map
Next Topic: Re: using of EXECUTE???

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

Current Time: Sat Nov 29 15:14:24 PST 2025

Total time taken to generate the page: 0.87687 seconds