View Single Post
Old 04-15-2005, 08:39 AM   #4 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 730
DJMaze is on a distinguished road
There's 1 thing you should keep in mind
PHP Code:
int i 0;
if (++
== 0) {
  
// do something

vs
PHP Code:
int i 0;
if (
i++ == 0) {
  
// do something

The first is always false because it starts at 1 and the second is true because it starts at 0.
So the first script should be
PHP Code:
int i 0;
if (++
== 1) {
  
// do something

I don't know if this is with all compilers, but you should check.

Last edited by DJMaze; 04-15-2005 at 11:59 AM.
DJMaze is offline   Reply With Quote