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

Home » Public Forums » archive » Re: Some special behaviour of ROUTINE_NAMES
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Some special behaviour of ROUTINE_NAMES [message #19159 is a reply to message #19141] Fri, 25 February 2000 00:00 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Craig Markwardt wrote:
> I don't know what possibilities you are talking about :-), but you can
> make funny and illegal structures by yourself too. Amuse your
> friends.
>
> 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.

Don't make a habit of it, because it's illegal in IDL 5.3:

IDL Version 5.3 (Win32 x86). (c) 1999, Research Systems, Inc.
IDL> foo = create_struct('1',1, '2',2)
% CREATE_STRUCT: Illegal tag name: 1.
% Execution halted at: $MAIN$

The documentation actually states that structure tag names must follow
the same rules as variable names. It just wasn't enforced in
create_struct() prior to IDL 5.3.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDLgrWindow (?) bug
Next Topic: object graphics colormap bug ?

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

Current Time: Sun Oct 12 06:01:13 PDT 2025

Total time taken to generate the page: 0.80143 seconds