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
T, Non functions don't need the parens. You are actually are passing 1 parameter of "2,3" When you do a "put DoStuff_2 (2,3)" LC is looking for a function DoStuff_2 that does not exist. If you do "DoStuff_2 2,3" you will get the expected results. Also if a non function does a "Return somevar" t