[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

translating an array name to a string



Hi. This is probably a very basic IDL question, so apologies if that's
the case. I'm looking for a way to translate the name of an array (e.g.
"DATACUBE1") into a string that I can use in titles and/or in feedback
at the prompt. I want to make my routines more user-friendly, and I hate
forcing a title 

Say I want to display a frame from a movie of images, called MOVIE. I
use tvim, and I currently say something like:

	tvim,MOVIE[*,*,i],$
	title='frame No.'+ARR2STR(i,/trim)+' of your datacube'.

(ARR2STR is a SolarSoftWare IDL routine which turns variable values into
strings, and the TRIM keyword removes unnecessary spaces - very handy!)

What I'd like to be able to do is say:

	...
	title='frame No.'+ARR2STR(i,/trim)+' of '+ARRNAME2STRING(movie)

so that I can instantly show which array I'm looking at, as well as
which frame.

Nothing obvious springs to my mind, so I thought I'd ask this newsgroup.


Thanks in advance for any help,
Dave Williams.<d.williams@qub.ac.uk>

-- 

=============================================================
David R. Williams,		Tel.: (+44 1232) 273509
APS Division,
Pure & Applied Physics Dept.,
Queen's University,
Belfast,
BT7 1NN.		http://star.pst.qub.ac.uk/~drw/
=============================================================