Re: Making an array of structures containing pointers [message #15331] |
Thu, 13 May 1999 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Kenneth P. Bowman (bowman@null.edu) writes:
> I'm trying to create a data structure to store a number of variable-length
> 1-D arrays that I am reading from a file.
>
> I have tried something like this
> ...
> IDL will not let me do the concatenation to concatenate the new structure
> (temp) onto the (would be) array of structures, list. It fails with
>
> % Conflicting data structures: TEMP,concatenation.
>
> I can do this successfully
>
> list = [list, list]
>
> to make an array of structures.
Try this article on my web page:
http://www.dfanning.com/tips/concatenate_structs.html
Basically, each anonymous structure has a "secret" name,
which makes them impossible to concatenate, since things
in an array must be *exactly* the same thing. The article
shows you a way out of this dilemma by copying the same
anonymous structure and reading into that.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Note: This follow-up was e-mailed to the cited author.]
|
|
|