parameter variables question
Chris Sheffield
cm_sheffield at yahoo.com
Tue Jul 29 17:25:01 EDT 2003
I've gotten stuck by this one several times. Because
you're returning a value, your handler has to be a
function. Use "function" instead of "on".
Chris Sheffield
--- Alex Rice <alrice at ARCplanning.com> wrote:
> Consider a handler that sums it's parameters before
> doing it's work,
> like this:
>
> on testIt p1, p2
> if p1 + p2 = 0 then
> return "bad parameters"
> else
> -- do stuff
> return empty
> end if
> end testIt
>
> Why does this handler throw an error when called
> like this?
>
> testIt 1, tSomeNonexistentVariable
> --
> -- Message execution error:
> -- Error description: Operators +: error in right
> operand
>
> if (p1 + p2) = 0 does not work either.
>
> Thanks,
>
> Alex Rice, Software Developer
> Architectural Research Consultants, Inc.
> http://ARCplanning.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
>
http://lists.runrev.com/mailman/listinfo/use-revolution
=====
Chris Sheffield
Read Naturally
www.readnaturally.com
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the use-livecode
mailing list