[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Variable name to string
- Subject: Variable name to string
- From: Chad Bender <cbender(at)mail.astro.sunysb.edu>
- Date: Tue, 17 Jul 2001 16:50:33 -0400
- Newsgroups: comp.lang.idl-pvwave
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:25728
Can anyone please point me towards the solution of the following
Say I want to create a program that will write the contents of a named
array to a
file of the same name. This could be accomplished by having the program
the user for both the variable name (getting the array by reference) and
the file name
(getting the string naming the output file), and the user just puts the
thing twice. However, I would like to be able to do it so the user only
has one prompt.
The program asks what variable should be output, the user gives the
and somehow the program is able to get a string with contents equivalent
to the variable
name for use in opening the output file.
Seems like it should be an easy problem, but for the life of me I can't
figure it out.
In case it matters, I'm running IDL 5.4 under RedHat Linux 6.2.
Dept of Physics and Astronomy
State University of New York @ Stony Brook