HP Pascal/iX Reference Manual (31502-90022)

12- 74
__________________________________________________________
NOTE This value must include the length word of the string
and any padding.
__________________________________________________________
Default 0 (each request is allocated from the heap with the exact
size required).
Location Heading.
Example
The following example shows two cases where the compiler can not
determine the size of a string at compile time. For performance reasons,
the temporary string is allocated in the stack at a fixed maximum of 400
bytes.
$STRINGTEMPLIMIT 400$
program strings;
type
str80 = string[80];
var
s1 : str80;
n : integer;
function f(var x : string) : str80;
begin
f := x + ':'; { size of x is unknown }
end;
begin
n := 40;
s1 := strrpt('*',n); { value of n is unknown }
s1 := f(s1);
end.
SUBPROGRAM
SUBPROGRAM is an HP Pascal Option.
The SUBPROGRAM compiler option causes the compiler to emit code for
specified level-one routines only. This includes routines nested within
those routines, but not the outer block.
Syntax
$SUBPROGRAM ['
pfname
[*] [,
pfname
[*]]...']$
Parameters
pfname
Name of a level-one routine. The compiler emits code for
pfname
and the routines nested within it, but not for the
outer block. If no
pfname
s are specified, or they are
entirely blank, the compiler compiles every routine, but
not the outer block.
* Causes the compiler to compile the immediately preceding
pfname
with the LIST, CODE, and TABLES options ON.
(Subsequent LIST, CODE, and TABLES options override *.)
Default All level-one routines.
Location At front.
A compilation unit can contain more than one SUBPROGRAM option. The
following are equivalent: