Arrays: new and old keys, i and, man am I annoyed

Malte Brill revolution at derbrill.de
Mon Sep 15 06:48:57 EDT 2008


Hi,

it does require quotes if you have set explicitvar to true (or the  
less mean variable checking by default setting in the script editors  
prefs). I have forced myself to turn that on a few years ago. Helps so  
much with debugging. With explicitvars set to true your script won't  
compile. Try turning them on and check if this script behaves as you  
would expect it to:

on mouseUp pMouseBtnNo
     local array,fred
     -- make sure vars are empty at first run
     delete local array
     delete local fred
     put 5 into array[fred]
     put array[fred]
     wait 2secs --wait for it
     put 2 into fred
     put array[fred]
     wait 2 secs
     put array["fred"]
     wait 2 secs
     put array[""]
end mouseUp

All the best,

Malte



More information about the use-livecode mailing list