Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ assert(3X) — AUX SR8.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ASSERT(3X)

NAME

assert − program verification

SYNOPSIS

#include <assert.h>

assert (expression);

DESCRIPTION

This macro is useful for putting diagnostics into programs.  When it is executed, if expression is false, it prints “Assertion failed: file xyz, line nnn” on the standard error file and exits.  Xyz is the source file and nnn the source line number of the assert statement.  Compiling with the preprocessor option −DNDEBUG (see cc(1)) will cause assert to be ignored. 

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