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

Home » Public Forums » archive » translating an array name to a string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
translating an array name to a string [message #22156] Thu, 19 October 2000 00:00
David Williams is currently offline  David Williams
Messages: 13
Registered: February 2000
Junior Member
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/
============================================================ =
[Message index]
 
Read Message
Previous Topic: Problems Compiling Projects
Next Topic: Re: IDLanROI Woes

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

Current Time: Fri Oct 10 01:44:09 PDT 2025

Total time taken to generate the page: 0.88012 seconds