You are here: Re: TRUE and FALSE are treated differently « PHP Programming Language « IT news, forums, messages
Re: TRUE and FALSE are treated differently

Posted by Gary L. Burnore on 01/06/08 23:26

On Sun, 06 Jan 2008 18:26:30 GMT, A Bit Narked <anonymous@example.com>
wrote:

>Can someone explain the rationale - if there is one - behind
>treating the constants TRUE and FALSE differently?
>
>echo false ;
>echo false+false ;
>echo intval(false) ;
>echo '"'.false.'"' ;
>
>echo true ;
>echo true+true ;
>echo intval(true) ;
>echo '"'.true.'"' ;
>
>should produce
>
>000"0"121"1"

No, it shouldn't. Perhaps if you could get past this bad assumption
it would help?

Try googling for the word boolean as others have suggested.


Go try the following in perl and see what happens. It won't be what
you expect either. You can then go complain to the people who USE
perl like you're complaining here.

print "True: " . true . "\n";
print "False: " . false . "\n";


--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Official .sig, Accept no substitutes. | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
Black Helicopter Repair Services, Ltd.| Official Proof of Purchase
===========================================================================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация