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

Home » Public Forums » archive » Re: structure-array-structure-array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: structure-array-structure-array [message #1135] Mon, 26 July 1993 08:15
ian is currently offline  ian
Messages: 26
Registered: February 1992
Junior Member
Word has it that hatay@spot.Colorado.EDU (Ferhat F. Hatay) may have said:
> I am trying to read a messy data through structures.
> Right now, my difficulty is with the definition
> of the structures.
>
> Basically, I could not figure out how
> to define a structure which has an array of structures
> in the declaration.
>
> In other words: Is there a better way of achieving the below
> operation?
>
> header = {trace, idum: 0L, ntrace: 0L, u: 0., v: 0., jdum: 0L}
>
> chunk = {record,idum1: 0L, ncnt: 0L, idum2: 0L,
> data1: {trace}, $
> data2: {trace}, $
> data3: {trace}, $
> data4: {trace}, $
> data5: {trace}, $
> data6: {trace}, $
> data7: {trace}, $
> data8: {trace}, $
> data9: {trace}}
>
> wholefile = replicate({record},50000)
>
>
> I want to be able declare data1 to data9 fields in a
> array.
>

Try this:

chunk = {record,idum1: 0L, ncnt: 0L, idum2: 0L,
data: replicate(header,9)}

help,/struc,chunk

)-Ian Novack (Particle Man)------------------------ian@gomez.jpl.nasa.gov-(
/ "I have long had a keen scientific interest in Jet Propulsion Lab \
( combustible breakfast foods..." -- Dave Barry Pasadena, CA )
\-Disclaimer: Had this been an actual opinion, it would still be mine.------/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: simple widget-based IDL text editor?
Next Topic: Resizing widgets

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

Current Time: Wed Oct 08 17:36:26 PDT 2025

Total time taken to generate the page: 0.00646 seconds