HP Pascal/iX Programmer's Guide (31502-90023)
11- 7
If the compiler can determine that
b
is a constant expression
whose value is
true
, then it does not generate code for the call
to
assert
.
i
An integer expression. If the value of
b
is
false
and
p
is
specified, procedure
p
is called with
i
as the actual value
parameter. If
b
is
false
and
p
is not specified, the system
issues a run-time error message that includes the value of
i
.
A call to the predefined function
statement_number
is a useful
integer expression for
i
. It returns the statement number (as
shown on the compiler listing) for the statement from which it is
called (in this case, the call to
assert
).
p
The name of a procedure whose heading has the syntax
PROCEDURE p (
parameter_name
: integer);
If the value of
b
is
false
and
p
is specified, the system
executes the call
p(i)
.
Figure 11-1 illustrates how the predefined procedure
assert
works.
Figure 11-1. How the Predefined Procedure Assert Works