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

Re: translating an array name to a string



David Williams wrote:

> 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

Have a look at the OUTPUT keyword to HELP:

IDL> help, movie
MOVIE           BYTE      = Array[256, 256, 64]
IDL> help, movie, output=output
IDL> print, output
MOVIE           BYTE      = Array[256, 256, 64]
CLU> print, (str_sep( output[0], " "))[0]
MOVIE

        Alex
-- 
  Alex Schuster     Wonko@weird.cologne.de          PGP Key available
                    alex@pet.mpin-koeln.mpg.de