Dumb Question About Variables (Revisited)

Raymond E. Griffith rgriffit at vnet.net
Tue Mar 26 14:08:01 EST 2002


on Tue, 26 Mar 2002 10:33:43 Gregory Lypny <gregory.lypny at videotron.ca>
wrote:

> 
> Hi Everyone,
> 
> A few days ago I asked about creating variables on the fly.  It was
> suggested that I enclose the unchanging part of the variable name in
> quotations.  So I tried the repeat loop below as an experiment, hoping to
> generate H1 = 11, H2, =12, and so on, up to H10 =20.
> 
> repeat with i = 1 to 10
> put i+10 into ("H" & i)
> end repeat
> 

Hmmm. Here is where an array structure would really shine.

repeat with i = 1 to 10
 put i+10 into H[i]
end repeat

It is easy to use, and avoids the problems you note.

Cheers!

Raymond





More information about the metacard mailing list