You are here: Re: Passing Boolean to a Function « PHP Programming Language « IT news, forums, messages
Re: Passing Boolean to a Function

Posted by David Haynes on 07/11/06 12:11

Jerry Stuckle wrote:
> No-Op is from Assembler - "No Operation", although it is more correctly
> referred to as "noop". It's an instruction which does nothing but take
> time and memory. Useful when you need to delay a couple of CPU cycles
> for something else to occur.
>
> And you are correct - the (bool) is needed if you want the value to be a
> boolean. However, if you're only going to test it, you could leave it
> as an integer 1/0 instead of true/false; the result would be the same.
>
> Personally I prefer the boolean. But that's only my preference; in most
> cases there's no technical reason to choose one over the other.
>
Wow! Now I really feel like a programming fossil. LOL!
Guess all those days of assembler programming are catching up on me. ;-)

RE: using (bool)
I agree. Anything that makes the type/intent clearer should be
encouraged.

-david-

 

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

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