Re: structure-array-structure-array [message #1135] |
Mon, 26 July 1993 08:15 |
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.------/
|
|
|