Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

ASSERT(3X)

��������
assert - �������� ����������� � ���������

���������

	#include <assert.h>
	
	assert (expression)
	int expression;

��������
������ ������ ������� ��� ��������� ����������� � ���������. ��� ���������� assert, ���� �������� ��������� expression - ���� (0), assert ������� � ����������� �������� ���������:

	Assertion failed: expression, file xyz, line nnn

� �������� �����������. � ��������� �� ������ xyz - ��� ��� ��������� �����, nnn - ����� ������ � �������� ������, ���������� ������ �������� assert.

��� ���������� � ������ ������������� -DNDEBUG [��. cpp(1)] ��� � ����������� ���������� ������������� #define NDEBUG ����� ���������� #include <assert.h> ������� ��� �������� ����������� ���������� � ��������� �� �����.

��. �����
abort(3C). cpp(1) � ����������� ������������.

�����������
��������� assert ���������� ��� ������, ��������� expression �� ����� ��������� ��������� ���������.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT