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

Home » Public Forums » archive » Re: [Q] structure definition with variable array size
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: [Q] structure definition with variable array size [message #12085] Sun, 28 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Matthew J. Sheats (sheats@lanl.gov) writes:

>> I wish to create a structure for holding a slice from a 3d volume along
>> with domain info, e.g.,
>>
>> pro slice__define
>> tmp = {slice, data:fltarr(100,100), x:fltarr(100), y:fltarr(100), z:0.0}
>> end
>>
>> This definition is fine if the data dimensions are known. However, what
>> if the array sizes are only known at runtime when the data file is opened
>> and brought into IDL. Is it possible to have structures with arbitrary
>> length arraysa la F90, C, or Pascal?
>>
>
> Unfortunately, the only way I have found to defeat this limitation is
> to use pointers.

"Unfortunately"!? Fortunately, there *are* pointers to make these
kinds of things possible. Think of a world without arrays of
variable length vectors, etc. Why, we would all have to learn
to program in BASIC. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Keyword_Set vs N_Elements Re: Problems with CW_FSLIDER
Next Topic: Re: [Q] IDL 5.1, passing keyword params to subprocedures

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

Current Time: Sun Apr 26 15:11:52 PDT 2026

Total time taken to generate the page: 2.23940 seconds