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

Home » Public Forums » archive » name a variable with number
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 a variable with number [message #87464 is a reply to message #87461] Tue, 04 February 2014 11:45 Go to previous messageGo to previous message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
On Tuesday, February 4, 2014 6:07:16 PM UTC, David Fanning wrote:
>
> I think we are all confused about how hard-coding more variable names
>
> can be a shortcut to doing *anything* over and over again. It seems to
>
> me to be the *last* thing you would want to do. Doing things over and
>
> over again are exactly what arrays and lists are good for.
>

How I use it is slightly different to the OP, maybe hence the confusion. I don't so much use it to split up data but to treat data from various sources the same way. It's pretty much the opposite of having hard-coded variable names.

e.g. It's normally when I have data in the same format from various different sources (usually different model runs) which I want to do the same thing to. Rather than have a chunk of code for each data source, to do the same thing to modelA, modelB, modelC, etc I just use execute to make thisModel=modelA within a loop and then act on each in turn.

That probably doesn't make any more sense though ;-)
[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
Previous Topic: accessing IDL internal (aka "built-in") routines
Next Topic: Error using data structures while reading ASCII file with different data types

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

Current Time: Fri Oct 10 05:09:52 PDT 2025

Total time taken to generate the page: 0.00209 seconds