Passing parameters by reference
dsc at swcp.com
Fri Mar 9 19:05:59 CST 2012
Oh, that would be cool!
Maybe the array could be global (or passed as a parameter) and the subscript passed.
add 1 to a["x"]
... it seems like a reasonable thing to do. There might be problems I don't see right off, such as access to the same array at two different levels at the same time.
On Mar 9, 2012, at 4:30 PM, Pete wrote:
> I think I already know the answer to this so just confirming in case I'm
> missing something
> Let's say I have a handler with a parameter that is passed by reference, eg
> "command xyz @parm1". If I try to pass an element of an array, eg "xyz
> theArray", I get a runtime error. If, however, I pass the whole array,
> eg "xyz theArray", all seems to work fine.
> That seems somewhat strange to me but apparently that's the way it is?
> Molly's Revenge <http://www.mollysrevenge.com>
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode