EDIT: sorry, only read your first post when i wrote it ^^
The manual says you should not do a Boolean check on a pointer and comp it's member(s) values in the same if(). Is this still true.
Yes.
Also does this apply if you are doing the Boolean check on the contents of a VAR and not it's pointer.
It depends of what you want to do. variables in if's evaluate to "false" if they are 0 and to "true" if they are non-zero. Here are some examples:
i=10;
if(i) -> if(true) -> will execute
i = -20;
if(i) -> if(true) -> will execute
i = 0;
if(i) -> if(false) -> will not execute
so your second example will work only if I > 500 ("I &&" is useless, because if(i) means if i is not 0. But your second contion I>500 includes that i is not null).
Why do you need to check it with poitners in an if?
3dgs evaluates all conditions in the if. If you have something like the following:
pan_temp = NULL;
if( pan_temp && pan_temp.pos_x != 1024 )
It will evaluate to the following:
if(NULL && NULL.pos_x != 1024 )
And because NULL has no property pos_x, the compiler will show an error.