assert.html 748 B

1234567891011121314151617181920212223242526272829303132333435
  1. <html>
  2. <head>
  3. <title>assert</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>assert</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. assert - check assumptions at run time
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;assert.h&gt;<br>
  13. <br>
  14. assert(expression);
  15. <h3>Description</h3>
  16. assert checks that its argument evaluates to true. If this is not the
  17. case, an error message is printed and <A HREF=abort.html>abort</A> is
  18. called.
  19. <p>
  20. assert is a macro. If the macro NDEBUG is defined at compile time,
  21. assertion tests are removed.
  22. <h3>Caution</h3>
  23. Avoid writing assert expressions with side effects, as compiling with
  24. NDEBUG may or may not cause the side effects to disappear.
  25. </body>
  26. </html>