molkman
Owner of George Washington's Prototype Mittens
2005 May 2 • 2066
404 ₧
|
Okay, I'm trying to get a little into C stuff since it's required for iOS programming. But I don't really get the writing formalities yet. This is probably an easy question, ha.
For example this code:
code BOOL trueOrFalse = YES; if (trueOrFalse) NSLog(@"trueOrFalse is true.") if (1) NSLog(@"1 is considered to be true.");
What does if (trueOrFalse) check here? Is it basically like, "if trueOrFalse is yes" or what does the "if" relate to? I mean, it doesn't say "if(trueOrFales == YES)", but instead just the variable. :O
And does the if(1) the same as if(trueOrFalse == 1)?
|
|
|
|
≡
|
2011 Mar 17 at 20:12 UTC
— Ed. 2011 Mar 17 at 20:13 UTC
|
|