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]
|