How do I test a variable for a +ve or -ve number ?

 
if (xx >= 0)
   {
   //positive
   }
else
   {
   //negative
   }
 

The following articles are on-topic:

http://thedailywtf.com/Articles/When__0x22_n__0x2a__%28-1%29_0x22__Won_0x27_t_do__0x2e__0x2e__0x2e_.aspx

http://thedailywtf.com/Articles/When_%28n_0x3c_0%29_won_0x27_t_do_0x2e_.aspx

http://stackoverflow.com/questions/4099366/how-do-i-check-if-a-number-is-positive-or-negative-in-c


SCNR