0

I have declared kbSize as an integer earlier in my code as a global variable, so there's no confusion from replies with it being local, and have a formula that process's its value, but for some reason when my program hits this if statement, it always calls timeStamp(); even when kbSize does not equal any of those values. Sup?

if( kbSize == 2000 || 3000 || 4000 || 5000);
{
    timeStamp();
}

the formula is a simple one which gets processed through each loop of the code so that it gets updated.

kbSize = end - beg;
2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by clutchkiller
0

>>if( kbSize == 2000 || 3000 || 4000 || 5000);

There are several things wrong with the above statement:
1) the semicolon at the end makes it a do-nothing statement.
2) it should be formatted like this: if( kbSize == 2000 || kbSize == 3000 || kbSize == 4000 || kbSize == 5000)

0

oh my god... i didnt even realize i put that semi colon there lol. Thanks Dragon =D.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.