pTAL Reference Manual (H06.08+)

Statements
HP pTAL Reference Manual523746-006
12-10
CALL
Examples:
1. The bit deposit assignment sets bits 3 through 7 of the word designated by x:
INT x;
x.<3:7> := %B11111;
2. The bit deposit assignment replaces bits <10> and <11> with zeros:
INT old := -1; ! old = %b1111111111111111
old.<10:11> := 0; ! old = %b1111111111001111
3. The bit deposit assignment sets bit <8>, the leftmost bit of strng, to 0:
STRING strng := -1; ! strng = %b11111111
strng.<8> := 0; ! strng = %b01111111
4. The value %577 is too large to fit in bits <7:12> of var. The system truncates
%577 to %77 before performing the bit deposit:
INT var := %125252; ! var = %b1010101010101010
var.<7:12> := %577; ! %77 = %b0000000101111111
! var = %b1010101111111010
5. The bit deposit assignment replaces bits <7:8> of new with bits <8:9> of old:
INT new := -1; ! new = %b1111111111111111
INT old := 0; ! old = %b0000000000000000
new.<7:8> := old.<8:9>; ! new = %b1111111001111111
CALL
The CALL statement calls a procedure, subprocedure, or entry-point identifier and
optionally passes parameters to it.
In pTAL, a procedures formal and actual parameters either match if the data type of
each formal parameter and its corresponding actual parameter match exactly or match
if the data type of the actual parameter is converted according to the rules under
Converting Between Address Types on page 3-7.
identifier
is the identifier of a previously declared procedure, subprocedure, or entry-point
identifier.
(
param-name
param-pair
CALL
identifier
)
,
VST038.vsd