Re: Odds and Evens!

From: Date: Wed, 23 Aug 2000 11:39:30 +0000
Subject: Re: Odds and Evens!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13140@lists.php.net to get a copy of this message
Dear Jason, Your algebra teacher's full of shoot. Zero is most definitely even. It is NOT positive or negative, but I think we covered the sgn() function a couple of weeks ago on this list. :-) Every once in a while that day job becomes handy... Later, Matt ---------------------------------------------------------------- Matthew Leingang 617/495-2171 Harvard University leingang@math.harvard.edu Department of Mathematics "This signature needs no quote." On Tue, 22 Aug 2000, Jason Murray wrote: > With the % operator and the & operator, be aware that if the > variable is equal to 0, then the expression will be zero. > > $a % 2 == 0 > $a & 1 == 0 > > when $a == 0 > > I don't know about you, but my algebra teacher ingrained in our > still-developing little brains that "zero is neither even nor > odd". > > Greetings, > Jason > > -- > Jason Murray > Developer > jWeb New Media Design > > --kcfhcemifllpadfdkcng > Content-Type: message/rfc822 > Content-Disposition: inline; filename="php-general_12954.ezm" >

« previous php.general (#13140) next »