function assert (a, p)
%ASSERT  Check assertions.
%
%   ASSERT(a == 5, 'a == 5');

if ~a
    if nargin > 1,
        error(['Assertion (' p ') failed.']);
    end
    error('Assertion failed.');
end
