Question about operators

Ralph DiMola rdimola at evergreeninfo.net
Thu Feb 16 16:28:18 EST 2012


Yes you are correct. I looked back at the code and it was in a repeat while
analyzing field heights and widths. Back then I looked at that code for an
hour until I convinced myself that something else was going on. Added the
parens and all was good. I will try to create a sample based on my problem
and convince myself again.

Thanks

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
Phone: 518-636-3998 Ex:11
Cell: 518-796-9332


-----Original Message-----
From: use-livecode-bounces at lists.runrev.com
[mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Bob Sneidar
Sent: Thursday, February 16, 2012 3:20 PM
To: How to use LiveCode
Subject: Re: Question about operators

You must be mistaken about why it isn't executing. It is working for me. 

In a button script: 
ON mouseUp pMouseBtnNo
    IF 1=2 OR 1=1 THEN put "Awesome!" ELSE put "Bugger!"
END mouseUp

displays "Awesome!"

Bob


On Feb 16, 2012, at 10:35 AM, Ralph DiMola wrote:

> I just had this situation:
> 
> If 1=2 or 1=1 then
> Some code would NOT execute here***wrong****
> End if
> 
> BUT....
> 
> If ( (1=2) or (1=1) ) then
> Some code would execute here****Correct*****
> End if
> 
> OR
> 
> If ( 1=2 or 1=1 ) then
> Some code would execute here****Correct*****
> End if
> 
> I just use parens all over the place now.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
> 
> 
> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com
> [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Bob Sneidar
> Sent: Thursday, February 16, 2012 12:09 PM
> To: How to use LiveCode
> Subject: Re: Question about operators
> 
> I have tried that to as a kind of between function. It doesn't work. It
will
> evaluate one part which will return true or false, then the next part
which
> essentially says true <= 8 which of course is false. 
> 
> Bob
> 
> 
> On Feb 16, 2012, at 7:49 AM, Timothy Bleiler wrote:
> 
>> Hi,
>> If I type Put 1<=1 AND 1<=8 into the message box I get true, but if
>> If I type Put 1<=1<=8 into the message box I get false.
>> 
>> Am I missing something or is the second form not allowed?
>> 
>> Thanks,
>> Tim Bleiler
>> 
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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
> 
> 
> _______________________________________________
> 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


_______________________________________________
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