Passing parameters by reference
Mark Wieder
mwieder at ahsoftware.net
Tue Mar 13 01:18:33 EDT 2012
Pete-
Monday, March 12, 2012, 5:39:16 PM, you wrote:
> I'm not sure whose post you're responding to Bob. Where do you see
> something that amounts to a statement being passed as a referenced
> parameter?
Here's the problem: a parameter of the form array["key"] is not a
pointer to the "key" element of the array but rather the value stored
in the array. So saying
myArray[myKey] = "hello"
doSomethingWith myArray[myKey]
gives a parameter of "hello" to
on doSomethingWith @arg
You'd have to somehow prevent the dereferencing of myArray[myKey] in
order to pass it by reference.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list