Strange hang

Kay C Lan lan.kc.macmail at gmail.com
Tue Jan 15 01:01:30 EST 2013


On Tue, Jan 15, 2013 at 12:44 PM, Robert Sneidar <slylabs13 at me.com> wrote:
> Yeah I misunderstood. The only thing you cannot do (and there is/was a request to implement this) is to pass an element of an array as a parameter to a command or function eg. put myFunction(myArray[1]) into bobtest.
>
> Bob

Bob,

Your scaring me! This is essential in my current project, I've
basically shotgunned my scripts with such, so if you're telling me
it's going to break at some stage, I'm going to cry.

1) New Main Stack
2) Add button
3) Copy and Paste this script into the button's script:

on mouseUp
   put 4 into aArray[1]
   put aArray[1] into msg
   put fAddNum(aArray[1]) into tBobTest
   put cr & tBobTest after msg
end mouseUp


FUNCTION fAddNum pNum
   add 10 to pNum
   return pNum
end fAddNum

Please tell me I've misunderstood and it's something else that can't be done.




More information about the use-livecode mailing list