Apparently commas are optional in a handler definition, e.g.:

   on DoSomething a b

But they are not optional when passing arguments to a definition, e.g.:

    Doomething a b

...throws a compilation error, but this:

    DoSomething a,b

...works.

Because most languages require commas separating arguments, and because calling a handler explicitly requires them, it never occurred to me that the definition would allow them to be optional.

Ideally the same rules would apply on both sides.

I can kinda understand why they don't here, but if we had comma-free arguments we could add syntactic sugar to make things more English-like, e.g.:

  DoSomething with a and b


Two questions:

How many of you have never before known that commas are optional between definition arguments?

For those who've known about this, were you confused to discover that this only works for definitions but not calls?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
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