Re: Parameters for functions and commands

2018-01-04 Thread Mike Kerner via use-livecode
I agree that the syntax should be the same. the parenthesis difference is annoying Then there's the way RETURN is handled in functions as opposed to handlers (vs RETURN FOR VALUE and RETURN FOR ERROR) On Thu, Jan 4, 2018 at 4:57 PM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wr

Re: Parameters for functions and commands

2018-01-04 Thread Thomas von Fintel via use-livecode
Thanks a lot, Ralph and Bob. I think, I've got it. Thomas Am 04.01.2018 um 22:57 schrieb Bob Sneidar via use-livecode: In short, yes. Commands can still pass parameters, and as you may not know CAN ALSO RETURN VALUES. The difference is that functions are called with parenthesis and must be

Re: Parameters for functions and commands

2018-01-04 Thread Bob Sneidar via use-livecode
In short, yes. Commands can still pass parameters, and as you may not know CAN ALSO RETURN VALUES. The difference is that functions are called with parenthesis and must be put into a variable. eg. function bobtest 1, 2 -- do some stuff return true -- do some other stuff end bobtest No

RE: Parameters for functions and commands

2018-01-04 Thread Ralph DiMola via use-livecode
vices rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Thomas von Fintel via use-livecode Sent: Thursday, January 04, 2018 4:30 PM To: use-livecode@lists.runrev.com Cc: Thomas von Fintel Subject: Parameters fo

Parameters for functions and commands

2018-01-04 Thread Thomas von Fintel via use-livecode
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 Do