ASSERT
Section: Linux Programmer's Manual (3)
Updated: April 4, 1993
Index
Return to Main Contents
À̸§
assert - expression ÀÌ °ÅÁþÀÎ °æ¿ì ÇÁ·Î±×·¥ Á¾·á
»ç¿ë¹ý
#include <assert.h>
void assert (int expression);
¼³¸í
<assert.h>
°¡ ¸¶Áö¸·À¸·Î Æ÷Ç﵃ ½ÃÁ¡¿¡
¸ÅÅ©·Î
NDEBUG
°¡ Á¤ÀǵǾî ÀÖÀ¸¸é, ¸ÅÅ©·Î
assert()
´Â ¾Æ¹« Äڵ嵵 »ý¼ºÇÏÁö ¾ÊÀ¸¸ç µû¶ó¼ ¾Æ¹« °Íµµ ÇÏÁö ¾Ê´Â´Ù.
±×·¸Áö¾Ê°í, (Áï,
NDEBUG
°¡ Á¤ÀǵǾîÀÖÁö ¾Ê°í)
expression
ÀÌ °ÅÁþÀ̸é, ¸ÅÅ©·Î
assert()
´Â ¿¡·¯ ¸Þ½ÃÁö¸¦ Ç¥ÁØ Ãâ·ÂÀ¸·Î Ãâ·ÂÇÏ°í,
abort()
¸¦ È£ÃâÇÏ¿© ÇÁ·Î±×·¥À» Á¾·áÇÑ´Ù.
ÀÌ ¸ÅÅ©·Î´Â ÇÁ·Î±×·¡¸Ó°¡ ¹ö±×¸¦ Àâ´Âµ¥¿¡ ¾²ÀδÙ. ½ÇÁ¦·Î "assertion failed in file foo.c, function
do_bar(), line 1287" ¿Í °°Àº ¸Þ½ÃÁö´Â ÀÏ¹Ý »ç¿ëÀÚ¿¡°Õ ¾Æ¹« ¼Ò¿ëÀÌ ¾ø´Ù.
¹Ýȯ°ª
¹Ýȯ°ªÀ» °®Áö ¾Ê´Â´Ù.
ȣȯ
ISO9899 (ANSI C)
¹ö±×
assert()
´Â ¸ÅÅ©·Î ±¸ÇöµÈ´Ù.;
assert()
·Î °Ë»çÇÏ´Â expressionÀÌ ºÎÀÛ¿ëÀ» ³º´Â´Ù¸é,
ÇÁ·Î±×·¥ÀÇ ½ÇÇàÀº
NDEBUG
°¡ Á¤ÀÇ µÇ¾î ÀÖ´À³Ä¿¡ µû¶ó ´Þ¶óÁø´Ù. ÀÌ·± Á¡ ¶§¹®¿¡ µð¹ö±ë ¸ðµå¿¡¼´Â »ç¶óÁö´Â Heisenbugs(ºÒÈ®Á¤¼º ¹ö±×)¸¦ ¸¸µé ¼ö ÀÖ´Ù.
°ü·Ã Ç׸ñ
exit(3), abort(3)
¹ø¿ª
ÇÑ±Û Manpage ÇÁ·ÎÁ§Æ® (http://man.kldp.org) 2005³â 1¿ù 30ÀÏ
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ȣȯ
-
- ¹ö±×
-
- °ü·Ã Ç׸ñ
-
- ¹ø¿ª
-
This document was created by
man2html,
using the manual pages.
Time: 13:51:08 GMT, January 30, 2005