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

Home » Public Forums » archive » Name of arrays
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: Name of arrays [message #79327 is a reply to message #79269] Tue, 21 February 2012 08:38 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Feb 21, 10:12 am, David Fanning <n...@idlcoyote.com> wrote:
> Craig Markwardt writes:
>> No, structures are easy.  You can add as many elements as you want and
>> they can be any size that you want.
>
>> ; First you create a dummy structure, or add some overall "metadata"
>> information if you want.
>> my_struct = {file_date:'2012-01-03'}  ;; Whatever you want
>
>> ; Then add as many data points as you want.
>> my_struct = create_struct(my_struct, TEMPERATURE+MONTH(0), fltarr(28))
>> my_struct = create_struct(my_struct, TEMPERATURE+MONTH(1), fltarr(30))
>> ...
>> my_struct = create_struct(my_struct, TEMPERATURE+MONTH(11),
>> fltarr(30))
>
>> Pointers introduce their own overhead of allocating, managing and de-
>> allocating them.  Structures are totally extensible and have basically
>> no mental overhead.
>
>> Later on, you can retrieve the contents with TAG_NAMES(), and the
>> "structure array" notation my_struct.(N).
>
> See, what did I tell you? Structures are totally inflexible,
> unless you know what you are doing with them. ;-)

It's just a matter of which foot you shoot. :-)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GRIB Webinar
Next Topic: Re: new graphics error message [_IDLITCONTAINER::SETPROPERTY]

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

Current Time: Fri Oct 10 09:28:41 PDT 2025

Total time taken to generate the page: 0.96262 seconds