is evaluation order defined, and evaluation of conditionals"and" to "or
bobs at twft.com
Tue Jun 26 11:48:34 EDT 2012
Foxpro was the same way. I think all modern languages work like that. It allows the developer to prioritize statements in the order of least to greatest cost. For most things no one would notice the difference, but for some operations it may make a big difference.
On Jun 25, 2012, at 9:38 PM, DunbarX at aol.com wrote:
> Jerry wrote":
> similarly if "or" is used instead of "and",
>> if the first part evaluates to "true", the second is NOT called.
> "or" is a simpler case, as there is never a need to evaluate after
> a first round "true". Again, at least externally.
> I changed the "and" to "or" in Jerry's example, and if the left side yields "false" the right side is then evaluated.
> The language does seem to process booleans from left to right. All this makes sense externally.
> I don't know why I thought it was somehow preocessed internally, with a boolean decision made at a lower level after
> parsing the line as a whole, between two already evaluated terms.
> LC just linearly goes along, merrily, almost, doing its thing step by step.
> Craig Newman
More information about the Use-livecode