Search found 1052 matches

by Ginto8
Wed Jan 14, 2009 5:42 am
Forum: Programming Discussion
Topic: A probably stupid SDL problem
Replies: 18
Views: 1694

Re: A probably stupid SDL problem

Thanks; I'm glad to be here. :) You know, it's funny how much the if( [variable] ) thing makes sense. All the comparison operators (>, ==, etc) return a bool value. So if you were to do if( [var1] == [var2] ), the == would either return true or false. Since there isn't a !, it will do whatever's in ...
by Ginto8
Mon Jan 12, 2009 9:03 pm
Forum: Programming Discussion
Topic: A probably stupid SDL problem
Replies: 18
Views: 1694

Re: A probably stupid SDL problem

Personally, I have my own safeguard against mixing up assignment and comparison operators. I don't really use if( [variable] == NULL ) or if( [variable] != NULL ) and you could replace NULL with 0 in those cases (NULL is a constant for 0, if I am not mistaken). Instead I use (or don't use) the unary...