Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ assert(S) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

abort(S)

cpp(CP)



     ASSERT(S)                XENIX System V                 ASSERT(S)



     Name
          assert - Helps verify validity of program.

     Syntax
          #include <stdio.h>
          #include <assert.h>

          void assert (expression)
          int expression;

     Description
          This macro is useful for putting diagnostics into programs
          under development.  When it is executed, if expression is
          false (zero), it displays:

               Assertion failed: expression, file name, line nnn

          on the standard error file and aborts.  name is the source
          filename and nnn is the source line number of the assert
          statement.

     Notes
          To suppress calls to assert, use the -DNDEBUG option (see
          cpp(CP)), or insert the preprocessor control statement,
          #define NDEBUG before the #include <assert.h> statement when
          compiling the program.

     See Also
          abort(S), cpp(CP)


























     Page 1                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026