ASSERT(3) BSD Programmer's Manual ASSERT(3) NNAAMMEE aasssseerrtt - expression verification macro SSYYNNOOPPSSIISS ##iinncclluuddee <<aasssseerrtt..hh>> aasssseerrtt(_e_x_p_r_e_s_s_i_o_n); DDEESSCCRRIIPPTTIIOONN The aasssseerrtt() macro tests the given _e_x_p_r_e_s_s_i_o_n and if it is false, the calling process is terminated. A diagnostic message is written to the _s_t_d_e_r_r and the function _exit(2) is called effectively terminating the program. If _e_x_p_r_e_s_s_i_o_n is true, the aasssseerrtt() macro does nothing. The aasssseerrtt() macro may be removed at compile time with the --NNDDEEBBUUGG op- tion, see cc(1). DDIIAAGGNNOOSSTTIICCSS The following diagnostic message is written to _s_t_d_e_r_r if _e_x_p_r_e_s_s_i_o_n is false: "assertion \"%s\" failed: file \"%s\", line %d0, \ "expression", __FILE__, __LINE__); HHIISSTTOORRYY A aasssseerrtt macro appeared in Version 6 AT&T UNIX. 4.4BSD June 9, 1993 1