Dumb Question About Variables (Revisited)
Gregory Lypny
gregory.lypny at videotron.ca
Tue Mar 26 10:35:01 EST 2002
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
It doesn't fly, unfortunately, and the error message I get is bad
chunk and a reference to the left parenthesis. Removing the parenthesis
doesn't help, but makes H the bad chunk. However, I remember being able
to do this in HyperCard. Any thoughts?
By the way, the technique above (as I think everyone knows) works if
the container is a field rather than a variable.
put i+10 into fld ("H" + i) -- not a problem
Greg
_________________________________________
Gregory Lypny
Associate Professor of Finance
John Molson School of Business
Concordia University
_________________________________________
"Absence of evidence is not evidence of absence."
- Anonymous
E-mail forum: markets at concordia.ca
Visit Pareto at http://rubbersoul.concordia.ca
Visit Borsa at http://rubbersoul.concordia.ca/Borsa_Classroom
Crash site for notes and quizzes at
http://homepage.mac.com/gregorylypny/FileSharing1.html
More information about the metacard
mailing list