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

Home » Public Forums » archive » Re: accessing structures
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: accessing structures [message #6475 is a reply to message #6471] Sun, 30 June 1996 00:00 Go to previous messageGo to previous message
brian.jackel is currently offline  brian.jackel
Messages: 23
Registered: May 1996
Junior Member
In article <4r48vn$jpu@lace.colorado.edu> kachun@bogart.Colorado.EDU (Ka Chun Yu) writes:

> Does anyone know how to access parts of structures in IDL? Looking
> up the version of IDL, I can type:
> IDL> print,!version
> { sparc sunos 3.6.1}

> I can't directly access the individual components, since a help will
> give:
> IDL> help,!version
> <Expression> STRUCT = -> !VERSION Array(1)

For this, try HELP,/STRUCT,!version
which gives something like:
** Structure !VERSION, 4 tags, length=32:
ARCH STRING 'x86'
OS STRING 'Win32'
OS_FAMILY STRING 'Windows'
RELEASE STRING '4.0.1'

Also handy are the routines:

N_TAGS(!version) which returns the number of tags in the structure
TAG_NAMES(!version) which gives an array of strings containing the tag names

Finally, tags can also be referenced by:

!version.(0) which is the same as !version.arch
!version.(1) !version.os
etc.

Hope this helps.
Brian Jackel
University of Western Ontario
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: save/restore file format
Next Topic: Simple MODULO question.

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

Current Time: Sun Oct 12 11:12:20 PDT 2025

Total time taken to generate the page: 0.95862 seconds