pTAL Reference Manual (H06.08+)

Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual523746-006
14-2
Procedure Declarations
Procedure Declarations
A procedure is a program unit that is callable from anywhere in the program. You
declare a procedure as follows:
type
specifies that the procedure is a function that returns a result and indicates the
data type of the returned result. type can be any data type described in
Section 3, Data Representation.
identifier
is the procedure identifier to use in the compilation unit.
public-name-spec
public-name
is the procedure name to use in the linker, not in the compilation unit. The
default public-name is identifier . public-name must conform to the
identifier rules of the language in which the external procedure is written. For all
languages except HP C, the compiler upshifts public-name automatically.
If a procedure declaration includes public-name-spec, it must also include
EXTERNAL
on page 14-4.
type
PROC
identifier
public-name-spec
parameter-list
proc-attribute
,
;
param-spec
;
proc-body
EXTERNAL
FORWARD
;
VST058.vsd
=
" "
VST209.vsd
public-name