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

Home » Public Forums » archive » 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
accessing structures [message #6478] Sat, 29 June 1996 00:00
kachun is currently offline  kachun
Messages: 7
Registered: June 1996
Junior Member
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)

Messier is figuring out what the individual components are called,
which will give string outputs:

IDL> print,!version.arch
sparc
IDL> print,!version.os
sunos
IDL> print,!version.release
3.6.1

My question is then how would I pull out what I need to know from
!version if I didn't know the names for the individual components
(i.e., "!version.arch", "!version.os")? Is there a command that
can pull out what I need, like this example below?

IDL> print,MYSTERY_COMMAND(!version,0)
sparc

--
--kachun +** Center for Astrophysics and Space Astronomy **+
+** University of Colorado, Boulder **+
+** Email: kachun@casa.colorado.edu **+
+** http://casa.colorado.edu/~kachun **+
[Message index]
 
Read Message
Previous Topic: Re: unpacking HRPT in IDL/ENVI
Next Topic: save/restore file format

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

Current Time: Sat Oct 11 16:11:23 PDT 2025

Total time taken to generate the page: 1.75406 seconds