View Single Post
Old 01-16-2007, 08:14 PM   #2 (permalink)
spectre
Junkie
 
You need two equals signs to do a comparison. For example: if (numResult == true)

Otherwise it just sets the variable equal and doesn't return the result of the comparison.

And where you have statements like if ( number2 = 0 ), you need if ( number2 == 0 ) instead.

*edit* Since numResult is a boolean variable already, you don't need to use "==true" You can just use "if (numResult)". The way the if statement works, it just looks for a true or false result within the parentheses. You don't really need to compare a boolean variable to anything since it already contains a true or false value. If you had an integer value, on the other hand, you need two equals signs to do a comparison.
__________________
"Fuck these chains
No goddamn slave
I will be different"
~ Machine Head

Last edited by spectre; 01-28-2007 at 10:59 AM..
spectre is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34