pTAL Reference Manual (H06.08+)
Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual—523746-006
14-15
Formal Parameter Specification
Topics:
•
Using STRUCT as a Formal Parameter on page 14-16
•
Passing an .EXT Parameter to a Non-EXTENDED Reference Parameter on
page 14-16
•
Using the PROC Formal Parameter on page 14-16
•
Referencing Parameters on page 14-16
Example 14-3. Function With Value and Reference Formal Parameters
PROC mult (var1, var2);
INT var1, ! Value parameter
.var2; ! Reference parameter
BEGIN
var2 := var2 + var1; ! Manipulate parameters
END;
Example 14-4. Reference Structure as a Formal Reference Parameter
STRUCT template (
*
); ! Template structure
BEGIN
INT a;
INT b;
END;
PROC .EXT p;
STRUCT ref_struct (template);
BEGIN
! Lots of code
END;










