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

Home » Public Forums » archive » Re: IDL data structures question
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: IDL data structures question [message #1484 is a reply to message #1398] Thu, 23 September 1993 07:22 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
jennifer@gaia.arc.nasa.gov (Jennifer Dungan) writes:

> I wonder if someone could help me with a
> programming problem. In IDL or PV-Wave,
> is it possible to create a data structure
> that has two dimensions, one containing
> an integer scalar, the other containing
> a vector _of variable length_? Basically,
> I want to be able to index some vectors,
> which are of various lengths, so I can loop
> through them. Seems to me I should be
> able to use structures somehow to create
> pointers, but I can't seem to figure it
> out.

> Any pointers (no pun intended) will be appreciated.


> Jennifer Dungan | MS 242-4
> Research Scientist | NASA Ames Research Center
> JCWS, Inc. Tel. (415) 604-3618 | Moffett Field, CA 94035-1000
> email: dungan@gaia.arc.nasa.gov | USA

In IDL you can use anonymous structures to do this. For example:

IDL> MYSTRUC = {MYTAG1: SCALAR_VARIABLE, $
MYTAG2: ARRAY_VARIABLE}

Since the structure doesn't have a name, you can create as many of them as you
want on the fly, each one with a different array size. The only restriction is
that one can't have an anonymous structure within another structure. (Please,
please, please RSI remove this restriction. :^) ).

Bill Thompson
[Message index]
 
Read Message
Read Message
Previous Topic: Re: RSI response to CONTOUR problems/questions.
Next Topic: FITS data format

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

Current Time: Sat Oct 11 12:53:55 PDT 2025

Total time taken to generate the page: 0.16159 seconds