is evaluation order defined, and evaluation of conditionals

FlexibleLearning admin at FlexibleLearning.com
Tue Jun 26 02:17:33 EDT 2012


There is a difference between logical and string comparisons.

A logical comparison using 'and/or' will exit as soon as 'false' is
encountered.
A string comparison using '=' (or 'is') or '<>' (or 'is not') will evaluate
both components.

Try func1()= func2() instead.

Hugh Senior
FLCo


> on mouseUp
>  local tFoo
>  put func1() and func2() into tFoo
> end mouseUp
>
> function func1
> return "false"
> end func1
>
> function func2
>    put "func2 was called"
>    return "true"
> end func2
>
> In this example, func2() IS NOT called.
> If func1 returns "true" instead, func2() IS called.





More information about the use-livecode mailing list