473,388 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

boolean operation

hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn
Jul 17 '05 #1
4 10000
i would say,
if ($_periode != NULL && $_periode != "")

Stijn Goris wrote:
hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn


Jul 17 '05 #2
On Wed, 22 Oct 2003 13:37:14 GMT, "Stijn Goris" <me*****@hotmail.com>
wrote:
hi all,

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")

kind regards
Stijn


if ($_periode != NULL && $_periode != "")

Steve
Jul 17 '05 #3
Hi,

Stijn Goris wrote:

what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")


As other people have pointed out, you need to use && instead of ||

If you're confused as to why, check out "demorgan's rule":
http://lc.brooklyn.cuny.edu/LeftBarF...ic/demorg.html

Regards,

Luke

Jul 17 '05 #4

On 22-Oct-2003, "Stijn Goris" <me*****@hotmail.com> wrote:
what is oposite of
if ($_periode == NULL || $_periode == "")

it is not

if ($_periode != NULL || $_periode != "")


as others have pointed out it should be
if ($_periode != NULL && $_period != "")

however you could also use

if (!($_periode == NULL || $_periode == ""))

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: greg | last post by:
Discussion is invited on the following proto-PEP. ------------------------------------------------------------- PEP ??? - Overloadable Boolean Operators...
6
by: Mr Flibble | last post by:
I have a class that has a LogOn method. I'm trying to think what the advantages are two approaches I have. a) Having a bool returned containing the success of the LogOn. b) Raising an...
16
by: Shawnk | last post by:
I would like to perform various boolean operations on bitmapped (FlagsAttribute) enum types for a state machine design as in; ------------------- enum portState { Unknown, Open,
18
by: Greg Scharlemann | last post by:
I'm having an issue passing a boolean to the constructor of an object. For some reason, if I pass false into the constructor, it doesn't register. If I pass an integer 0, it does. PHP 5 Code...
3
by: Cylix | last post by:
I have a function to validate the form I created: ------------------------------------------------------------------------------------------------------------------------------------ function...
10
by: Simon Brooke | last post by:
The DOM API has included public Node importNode(Node,boolean) as a method of the Document interface for a long time. Does anything actually implement it? Xerces 2 is giving me: ...
33
by: Stef Mientki | last post by:
hello, I discovered that boolean evaluation in Python is done "fast" (as soon as the condition is ok, the rest of the expression is ignored). Is this standard behavior or is there a compiler...
7
by: Flavio | last post by:
Hi, I have been playing with set operations lately and came across a kind of surprising result given that it is not mentioned in the standard Python tutorial: with python sets, intersections ...
270
by: Jordan | last post by:
Hi everyone, I'm a big Python fan who used to be involved semi regularly in comp.lang.python (lots of lurking, occasional posting) but kind of trailed off a bit. I just wrote a frustration...
2
by: shapper | last post by:
Hi, I have the following code line: (string)ViewData ?? ViewData.Model.Tags.ToString() How can I do something similar for a boolean type variable. I tried: (bool)ViewData ??...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.