is evaluation order defined, and evaluation of conditionals

Jerry Jensen jhj at
Mon Jun 25 20:13:27 EDT 2012

Note that exists() is only sensible for objects. From the dictionary:
"You can also specify a chunk of a container, but in this case the exists function always returns true."


On Jun 25, 2012, at 4:17 PM, Dr. Hawkins wrote:

> Is the order in which expressions will be evaluated defined int LiveCode
> For example, if I have fields such as live_cats live_dogs and such,
> some but not others of which have corresponding fields dead_cat,
> dead_mouse, etc, can if have a construct that comes to
> switch
>  case exists(dead_cat) and  ("bad_smell" is among the words of dead_cat)
> If it is defined that the leftmost expression is evaluated first, and
> the right-hand only if needed to resolve the "and," I would expect
> this to work.
> If it doesn't, though, things get more difficult:  using the exists()
> within the switch throws me down that path, and only down it can I
> check bad_smell.
> -- 
> The Hawkins Law Firm
> Richard E. Hawkins, Esq.
> (702) 508-8462
> HawkinsLawFirm at
> 3025 S. Maryland Parkway
> Suite A
> Las Vegas, NV  89109
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list