A probably stupid SDL problem

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: A probably stupid SDL problem

Post by MarauderIIC »

programmerinprogress wrote:Could you imagine the chaos if the C++ standardisation committee decided one day to start using different numbers for true and false? all hell would break loose!
Not true and false, just NULL. At the moment, it just happens to be that NULL is #defined to be 0 (== false). It's conceivable that at some point, on some C/++ library for some OS, NULL might be one past the system's max memory. I personally think that that's not a reasonable expectation, but it is conceivable. Hopefully you at least see the point =)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: A probably stupid SDL problem

Post by Ginto8 »

== NULL is "good practice" "in case they decide to change NULL from 0 to some other number"
Sounds like something XxStillAVirgin69xX would say... :lol:
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: A probably stupid SDL problem

Post by MarauderIIC »

Actually I heard it from someone that was more like ImaProfessional420, but I still don't agree with it.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: A probably stupid SDL problem

Post by Ginto8 »

:roll: If they decide to change the value of NULL, then we'll adapt. Until then, I will use if( [variable] ) and if(![variable] ).
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Post Reply