HP Pascal/iX Reference Manual (31502-90022)

9- 5
release
Usage
release
(p)
Parameter
p
A pointer variable that previously appeared as a parameter in
a call to mark, and should not have been previously passed to
release or altered by assignment.
Description
The procedure release
(p)
returns the heap to its allocation state when
mark
was called with a parameter that has the value of
p
. This has the
effect of deallocating any heap variables allocated since the program
called mark. The system can then reallocate the released space. The
system automatically closes any files in the released area.
It is an error if
p
was not passed as a parameter to mark, or if it was
previously passed to
release
explicitly or implicitly. After release,
p
is undefined.
Example
PROGRAM show_markrelease;
VAR
w,x,y: ^integer;
BEGIN
.
mark(w);
.
release(w); { Returns heap to state marked by w. }
.
mark(x);
.
mark(y);
.
release(x); { Returns heap to state marked by x. The }
. { pointer y no longer marks a heap state. }
END. { Release(y) is now an error. }
String Procedures
HP Pascal supports a number of
string procedures
that manipulate string
expressions, variables, or literals. A string expression may consist of
a string literal, a string variable, a string constant, a function result
that is a string, or an expression formed with the concatenation
operator.
Note that strings must be initialized just like any other variable. The
string procedures are setstrlen, strappend, strdelete, strinsert,
strmove, strread, and strwrite. These procedures are described in the
following pages.
setstrlen
Usage
setstrlen
(s, e)
Parameters
s
A string variable.