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

Home » Public Forums » archive » convert string into the name of a variable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
convert string into the name of a variable [message #28402] Wed, 05 December 2001 14:36
Frederic Raison is currently offline  Frederic Raison
Messages: 2
Registered: December 2001
Junior Member
Hi!

Is there anybody who could tell me if there is an IDL instruction, like
in Matlab, able to convert a string into the name of a variable and
vice-versa? I mean if I have defined :

a=1
b=2
list=['a','b']


I would like to write:

print,somme_instruction(list[0])

and to get:

1

Thank you

Frederic
[Message index]
 
Read Message
Previous Topic: I have committed a sin CONGRID
Next Topic: IDLWAVE: passing on the torch

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

Current Time: Wed Oct 08 18:28:59 PDT 2025

Total time taken to generate the page: 0.00497 seconds