Strange hang

Robert Sneidar slylabs13 at me.com
Tue Jan 15 12:18:59 EST 2013


Perhaps the enhancement has been implemented now. I am a bit vague on it now, but it seems to me that it also involved passing by reference. So if pNum were @pNum in your parameter declaration, maybe that was the problem. I think also the discussion was about passing as a reference a variable that was itself an array, so that in your function pNum was pNum[1], pnum[2] etc. 

http://lists.runrev.com/pipermail/use-livecode/2012-March/169504.html

Bob


On Jan 14, 2013, at 10:01 PM, Kay C Lan wrote:

> 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.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list