On 2016-02-10 18:06, Tiemo Hollmann TB wrote:
Bonsoir Thierry,
ui, thats fancy. I haven't seen yet a function which changes input
parameter as a kind of result

This is actually quite a rare pattern in the engine (when exposed as function type syntax at least)... However, user handlers can obviously do this with the use of the '@' symbol:

command returnMoreThanOneValue pInput, @rOutput1, @rOutput2
  put item 1 of pInput into rOutput1
  put item 2 of pInput into rOutput2
end returnMoreThanOneValue

(This works for on, command, function and private variants too).

If you prepend your parameter with @ then that handler must be called with something which looks like a variable, and in that case the variable itself is passed to the handler, rather than the variable's value.

Prior to 7 you could only use actual variables in such parameters, but from 7 you can use array elements too. i.e.

returnMoveThanOneValue "1,2", tArray[1], tArray[2]

Will work.

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to