Dumb Question About Variables (Revisited)

J. Landman Gay jacque at hyperactivesw.com
Tue Mar 26 12:48:01 EST 2002


Gregory Lypny wrote:

>  repeat with i = 1 to 10
>     put i+10 into ("H" & i)
>  end repeat
> 
>      It doesn't fly, unfortunately, and the error message I get is bad
> chunk and a reference to the left parenthesis.

It looks like you have to declare the variable first. The script below
works, but it will need some adjustment to be useful because the
variable is replaced by its own value each time through the loop:

  repeat with i = 1 to 10
    put "H"&i into theVar
    put i+10 into theVar
  end repeat

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the metacard mailing list