Parameters for functions and commands

Thomas von Fintel runrev at vonfintel.org
Thu Jan 4 16:30:15 EST 2018


I am well aware that I shouldn't expect *everything* in Livecode to be 
intuitive, but this one bugs me:

Having a handler like

    function DoStuff_1 a, b

       return a

    end DoStuff_1

When you do "put DoStuff_1 (2,3)" the result is 2.

But with

    on DoStuff_2 a, b

        put a

    end DoStuff_2

The result of DoStuff_2 (2, 3) is 2,3. "put a*b" produces an error.

This means, parameters are passed differently to command handlers and 
function handlers. Right?

Is that the way it should be and why?


Thanks for your patience

Thomas






More information about the use-livecode mailing list