Default values for handler parameters

Peter Haworth pete at lcsql.com
Sat Dec 7 21:33:43 EST 2013


Hi Craig,
It throws an error, I think it was something like "invalid parameter
separator".

Not a big deal but would save having to initialize optional parms with "if
p1 is empty then put true into p1" stuff.

Pete
lcSQL Software <http://www.lcsql.com>


On Sat, Dec 7, 2013 at 5:47 PM, <dunbarx at aol.com> wrote:

> Peter.
>
>
> Not with LC at the moment, but does this throw an error in that the
> parameter construction is invalid, or does it evaluate "p2=abc" as a
> boolean, resolving to "true" or "false"?
>
>
> Craig
>
>
>
> -----Original Message-----
> From: Peter Haworth <pete at lcsql.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Sat, Dec 7, 2013 7:44 pm
> Subject: Default values for handler parameters
>
>
> Live code allows:
>
> local tVar="abc"
>
> but it doesn't seem to allow:
>
> command myCommand p1,p2="abc"
>
> .. unless there's some other syntax for it.
>
> Seems like an omission?
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list