Create array with variables
HyperChris at aol.com
HyperChris at aol.com
Sun Aug 24 15:52:01 EDT 2003
repeat with n=1 to 64
get short name of fld n
put char 1 of it into x -- x is a letter and we need to switch it to a
number
put charToNum(x) - 64 into x -- assuming you are using capital letters:
A=1, B=2
put char 2 of it into y
-- build the transcript instruction so that from Rev's vantage point it is
formatted right
put "put fld" && n && "into array["& x &comma& y &"]" into
transcriptInstruction
do transcriptInstruction -- 'do' is a transcript command, see docs
end repeat
In a message dated 8/24/03 10:20:07 AM,
use-revolution-request at lists.runrev.com writes:
> I have made a 8x8 grid with fields ... named ... (A1, B1.. A2, B2..) and I
want to ...
> repeat with n=1 to 64
> put fld n into ("array"&char 1 of the short name of fld n)[char 2 of
the short name of fld n]
> end repeat
More information about the use-livecode
mailing list