View Single Post

Old 07-24-2008, 05:22 PM   #16 (permalink)
zev
Banned

Deviant
 
Join Date: Nov 2007
Posts: 76
zev is on a distinguished road
Default

Quote:
Originally Posted by Dyndrilliac View Post
...

Ok, I don't know how else to say this. What the **** do you think NULL is? It's a constant for zero. If a piece of data can only be a one or a zero, it is a boolean. Not a pointer to the instance of a class. Do you know why? Because if it were a pointer to the instance of a class, checking for one would not work. The data would be the address at memory where the instance of the class is located, and thus the gamestate check function that was posted would fail.

Not in game:


In game:


Just because you can apply boolean logic to it, doesn't mean that it was implemented as a boolean by the Blizzard programmer.

The code posted in this thread doesn't check for one either, it checks for 0.
( It could be heavily improved by using boolean logic, though )

Last edited by zev : 07-24-2008 at 05:39 PM.
zev 15 0FF11|\|3   Reply With Quote