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

Home » Public Forums » archive » Re: Is there a work around to save multiple variables with same head but different tails without listing all of them?
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: Is there a work around to save multiple variables with same head but different tails without listing all of them? [message #77878] Thu, 29 September 2011 07:46 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Sep 29, 10:16 am, voidspace <jhkim...@gmail.com> wrote:
> On 9월29일, 오후9시50분, greg.a...@googlemail.com wrote:
>
>> Although you can use tricks like this to do what you need, you would almost certainly have been better off to define your variables as arrays in the first place, and refer to them by their indices...
>
>> e.g.
>> sst_cccma_cgcm3[i]
>
>> Otherwise, you'll meet the same problem every time you want to do anything at all with their values (plot them, for example)
>
>> good luck!
>> Greg
>
> Thanks, Greg. Exactly. In fact I could put all different variables
> into one defined variable and save all of them in one array variable.
> This is certainly much better way. But today I had a good exercise
> about the string manipulation in IDL. Cheers, John

My guess is the poster's variables are arrays with varying size. I
used integers for simplicity in the example. In the case of arrays,
you're better off using a structure of arrays.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using PS_START to create A4 Landscape postscript?
Next Topic: Re: Saving via ImageMagick with Coyote Routines fails

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

Current Time: Wed Oct 08 13:33:53 PDT 2025

Total time taken to generate the page: 0.00622 seconds