From WikiChip
Editing c/assert.h/assert

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
{{c title|assert macro - <assert.h>}}{{Assert.h - C}}
+
{{DISPLAYTITLE: assert macro - <assert.h> - C}}
The '''assert''' macro, which is part of {{C|assert.h|<assert.h>}} can be used to insert diagnostic tests into a program.
+
{{Assert.h - C}}
 +
The '''assert''' macro, which is part of <[[assert.h - C|assert.h]]> can be used to insert diagnostic tests into a program.
  
 
== Synopsis ==
 
== Synopsis ==
Line 12: Line 13:
  
 
* The text of the argument
 
* The text of the argument
* The name of the source file ({{C|__FILE__}})
+
* The name of the source file ([[__FILE__ - C|__FILE__]])
* The source line number ({{C|__LINE__}})
+
* The source line number ([[__LINE__ - C|__LINE__]])
* The name of the enclosing function ({{C|__func__}}) ([[C99]])
+
* The name of the enclosing function ([[__func__ - C|__func__]]) ([[C99]])
  
If '''NDEBUG''' is defined as a macro name prior to the inclusion of {{C|assert.h|<assert.h>}}, assert gets defined as:
+
If '''NDEBUG''' is defined as a macro name prior to the inclusion of <[[assert.h - C|assert.h]]>, assert gets defined as:
  
 
<source lang="c">#define assert(ignore) ((void)0)</source>
 
<source lang="c">#define assert(ignore) ((void)0)</source>
Line 62: Line 63:
  
 
== See also ==
 
== See also ==
* {{C|Assert.h/static_assert|static_assert macro}}
+
* [[Assert.h/static_assert - C|static_assert macro]]
* {{C|assert.h|<assert.h> header}}
+
* [[assert.h - C|<assert.h> header]]
* {{C|standard library|C Standard Library}}
+
* [[C standard library]]
* [[C]]
+
* [[C Programming Language]]
  
{{DEFAULTSORT:assert}}
+
{{DEFAULTSORT:assert - assert.h - C}}
 
[[Category:assert.h - C]]
 
[[Category:assert.h - C]]
 
[[Category:Assertion - C]]
 
[[Category:Assertion - C]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)