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

Re: Some special behaviour of ROUTINE_NAMES

Karsten Rodenacker <rodena@gsf.de> writes:

> Hallo IDL gurus,
> did anybody remark the quite special behaviour of that undocumented
> function ROUTINE_NAMES. Try to read with the idl macro import_image a
> file beginning with a number. A structure is generated with a variable
> name starting with a number, which is quite difficult to be accessed.
> Doesn't that open a lot of new possibilities?

I don't know what possibilities you are talking about :-), but you can
make funny and illegal structures by yourself too.  Amuse your

IDL Version 5.2.1 (linux x86). (c) 1999, Research Systems, Inc.
IDL> foo = create_struct('1',1, '2',2)
IDL> help, /struct, foo
** Structure <817fda4>, 2 tags, length=4, refs=1:
   1               INT              1
   2               INT              2
IDL> print, foo.(0), foo.(1)
       1       2

But, as you can see, the elements can be accessed by using the
array-like indexing of structure tags.


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response