Raised This Month: $ Target: $400
 0% 

Is number negative or not?


Post New Thread Reply   
 
Thread Tools Display Modes
Old 01-18-2014, 08:11
WiggPerson
This message has been deleted by WiggPerson.
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2014 , 08:13   Re: Is number negative or not?
Reply With Quote #2

Quote:
Originally Posted by WiggPerson View Post
Code:
if(8) { // Your number
    // positive
} else { 
    // negative
}
Or simply
Code:
if(!-1) {
    // negative
}
Won't work, any Non-Zero value will be considered True
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode