Quotes Required Around Keys in 2 Dimensional Arrays?

Shao Sean shaosean at unitz.ca
Sun Apr 14 20:24:01 EDT 2002


> Now in the above example, using (tDataIn[email]) will not work...it passes
> empty to the email checker which then breaks.

without the quotes it thinks you're using a variable to say the name of the
key

example:

local vCow, vaAnimalSounds
put "cow" into vCow
put "oink" into vaAnimalSounds["pig"]
put "moo" into vaAnimalSounds["cow"]
put vaAnimalSounds[vCow]  -- displays "moo"
put vaAnimalSounds[cow]  -- displays nothing
put vaAnimalSounds["cow"]  -- displays "moo"


personal i'd really love to have stronger array support (like in PHP or even
REALbasic) as trying to use arrays is very limited (as i've found)..




More information about the use-livecode mailing list