What if....
Robert Sneidar
slylabs13 at me.com
Tue Jan 29 15:04:50 EST 2013
if false and false or true then
becomes:
if (false and false) or true then
becomes:
if false or true then
becomes:
if true then
answer "Got it 4!"
You are thinking of false and true as individual statements and they are not. The whole condition is one statement.
Or if you like, the ands are one statement, which evaluates to false, and then there is a new statement to evaluate: false or true. Either way it works.
Bob
On Jan 28, 2013, at 11:56 PM, Paul Hibbert wrote:
>
> On 2013-01-28, at 11:40 PM, Thierry Douez wrote:
>
>> don't have to check for each sub-condition if it is true, for instance:
>
> Maybe I'm wrong, but the way I read statement 4, the first condition is false (if false and false) so the if statement continues to the second condition (or true) and returns "true".
>
> I thought in this case the If statement will stop on a true statement but not on a false (unless that is what you specify).
>
> e.g. if false and false or true is false then ## = False
>
> Paul
> _______________________________________________
> 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