Hi Andy.
This is fantastic! Thanks very much for your help. :)
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Andy Watts
Sent: Monday, November 22, 2010 4:13 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BAQ/Progress: Comparing Boolean Values
Hi Joe,
The only direct comparisons you can make between two boolean values are
Equals or Not Equals, for example:
If logX = logY Then...
If Not(logX = logY) Then...
You can't directly use greater than or less than comparisons, so you
might consider writing a little explicit logic thus:
If Not(logX) And Not(logY) Then... [logX is False, logY is False]
If Not(logX) And logY Then... [logX is False, logY is True]
If logX And Not(logY) Then... [logX is True, logY is False]
If logX And logY Then... [logX is True, logY is True]
This covers all bases. Note that If logX is the same as If logX = True
and If Not(logX) is the same as If logX = False - just less typing!
I hope this helps, if it isn't too late :-)
Regards,
Andy Watts, Ripley Engineering Ltd.
1. BAQ/Progress: Comparing Boolean Values
<http://groups.yahoo.com/group/vantage/message/95570;_ylc=X3oDMTJwbTIxdm
4yBF9TAzk3MzU5NzE1BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAM5NT
U3MARzZWMDZG1zZwRzbGsDdm1zZwRzdGltZQMxMjkwMDg0MDA5>
2. Posted by: "Joe Rojas" jrojas@...
<mailto:jrojas%40matsinc.com>
<mailto:jrojas@... <mailto:jrojas%40matsinc.com>
?Subject=%20Re%3A%20BAQ%2FProgress%3A%20Compar
ing%20Boolean%20Values> jagojoer <http://profiles.yahoo.com/jagojoer>
Wed Nov 17, 2010 2:13 pm (PST)
Hi All,
Is it possible to do comparisons between to Boolean field other than
equals?
I tested it out and couldn't get it work so I thought I ask the group.
For example, assuming that TRUE and FALSE are stored as something like
1/0 or -1/0 (and this could be the wrong assumption), we could end up
with the following possible combinations between two fields: 0 and 0, 1
and 1, 1 and 0, 0 and 1
I'd like to be able to compare Boolean 1 to Boolean 2 by using the
greater than or less than symbol.
Is this possible?
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... <mailto:jrojas%40matsinc.com>
<mailto:jrojas%40matsinc.com> | www.matsinc.com Ask
us about our clean, green and beautiful matting and flooring
Ripley Engineering Ltd
Tel: 01256-473940/464167
Mob:
www.ripley-eng.co.uk
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
This is fantastic! Thanks very much for your help. :)
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Andy Watts
Sent: Monday, November 22, 2010 4:13 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BAQ/Progress: Comparing Boolean Values
Hi Joe,
The only direct comparisons you can make between two boolean values are
Equals or Not Equals, for example:
If logX = logY Then...
If Not(logX = logY) Then...
You can't directly use greater than or less than comparisons, so you
might consider writing a little explicit logic thus:
If Not(logX) And Not(logY) Then... [logX is False, logY is False]
If Not(logX) And logY Then... [logX is False, logY is True]
If logX And Not(logY) Then... [logX is True, logY is False]
If logX And logY Then... [logX is True, logY is True]
This covers all bases. Note that If logX is the same as If logX = True
and If Not(logX) is the same as If logX = False - just less typing!
I hope this helps, if it isn't too late :-)
Regards,
Andy Watts, Ripley Engineering Ltd.
1. BAQ/Progress: Comparing Boolean Values
<http://groups.yahoo.com/group/vantage/message/95570;_ylc=X3oDMTJwbTIxdm
4yBF9TAzk3MzU5NzE1BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAM5NT
U3MARzZWMDZG1zZwRzbGsDdm1zZwRzdGltZQMxMjkwMDg0MDA5>
2. Posted by: "Joe Rojas" jrojas@...
<mailto:jrojas%40matsinc.com>
<mailto:jrojas@... <mailto:jrojas%40matsinc.com>
?Subject=%20Re%3A%20BAQ%2FProgress%3A%20Compar
ing%20Boolean%20Values> jagojoer <http://profiles.yahoo.com/jagojoer>
Wed Nov 17, 2010 2:13 pm (PST)
Hi All,
Is it possible to do comparisons between to Boolean field other than
equals?
I tested it out and couldn't get it work so I thought I ask the group.
For example, assuming that TRUE and FALSE are stored as something like
1/0 or -1/0 (and this could be the wrong assumption), we could end up
with the following possible combinations between two fields: 0 and 0, 1
and 1, 1 and 0, 0 and 1
I'd like to be able to compare Boolean 1 to Boolean 2 by using the
greater than or less than symbol.
Is this possible?
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... <mailto:jrojas%40matsinc.com>
<mailto:jrojas%40matsinc.com> | www.matsinc.com Ask
us about our clean, green and beautiful matting and flooring
Ripley Engineering Ltd
Tel: 01256-473940/464167
Mob:
www.ripley-eng.co.uk
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]