2010-05-02 5 views

답변

7

NSCAssert() (도 NSCAssert1() ... 최대 포함)

4
void assert(int expression); 

If expression evaluates to 0 (false), then the expression, source code filename, 
and line number are sent to the standard error, and then calls the abort 
function. 

If the identifier NDEBUG ("no debug") is defined with #define NDEBUG then the 
macro assert does nothing. 

예 :

assert(x != 0); 

참고 : 012 assert.h

+0

또한 assert (x! = 0 && "what that hey?")'에 대한 http://vgable.com/blog/2008/12/04/nsassert-considered-harmful을 참고하십시오. . –