ASSERT(3) BSD Library Functions Manual ASSERT(3)NAME
assert -- expression verification macro
SYNOPSIS
#include <assert.h>
assert(expression);
DESCRIPTION
The assert() macro tests the given expression and if it is false, the calling process is terminated. A diagnostic message is written to
stderr and the function abort(3) is called, effectively terminating the program.
If expression is true, the assert() macro does nothing.
The assert() macro may be removed at compile time by defining NDEBUG as a macro (e.g., by using the cc(1) option -DNDEBUG).
EXAMPLES
The assertion:
assert(1 == 0);
generates a diagnostic message similar to the following:
Assertion failed: (1 == 0), function main, file assertion.c, line 100.
SEE ALSO abort(3)STANDARDS
The assert() macro conforms to ISO/IEC 9899:1999 (``ISO C99'').
HISTORY
An assert macro appeared in Version 6 AT&T UNIX.
BSD January 26, 1999 BSD
Check Out this Related Man Page
assert.h(3HEAD) Headers assert.h(3HEAD)NAME
assert.h, assert - verify program assertion
SYNOPSIS
#include <assert.h>
DESCRIPTION
The <assert.h> header defines the assert() macro. It refers to the macro NDEBUG which is not defined in the header. If NDEBUG is defined as
a macro name before the inclusion of this header, the assert() macro is defined simply as:
#define assert(ignore)((void) 0)
Otherwise, the macro behaves as described in assert(3C).
The assert() macro is redefined according to the current state of NDEBUG each time <assert.h> is included.
The assert() macro is implemented as a macro, not as a function. If the macro definition is suppressed in order to access an actual func-
tion, the behavior is undefined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO assert(3C), attributes(5), standards(5)SunOS 5.11 10 Sep 2004 assert.h(3HEAD)
I get this error when I try to FTP from an HP Alpha Server to a UNIX box.
FATAL: BUILD13$:SSHFC_TRANSFER.C;1:1835 SshFCTransfer (function name unavailable) Assertion failed: tdata
->current_dest_file->attributes->flags & 0x00000004
the sftp /put fails just before it does the actual transfer.... (2 Replies)
Hi all.
I wrote a program with the Motif Widget Toolkit. It has a
button and a scrollbar. When the user hits the button the
callback creates a new fork() thread. The new thread sleeps
for a while and then changes the position of the scrollbar.
It does this in an endless loop.
I need the... (2 Replies)
I'm sorry if the title is really criptic, but I don't know how to phrase my problem.
I know I can't really ask for a solution, and I normally wouldn't but this is really escaping my abilities.
Antefacts.
I developed a program using the zeromq messaging library.
I got to a point where the... (11 Replies)