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 #79328 is a reply to message #79269] Tue, 21 February 2012 07:12 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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. ;-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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 11:23:52 PDT 2025

Total time taken to generate the page: 0.88184 seconds