pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

right-bit
is an INT constant specifying the rightmost bit of the bit deposit field. right-bit must be
equal to or greater than left-bit.
For STRING variables, specify a bit number in the range 8 through 15. Bit 8 is the leftmost bit
in a STRING variable; bit 15 is the rightmost bit.
expression
is an INT arithmetic or conditional expression, with or without a bit field specification.
The bit deposit field is on the left side of the assignment operator (:=). The bit deposit assignment
changes only the bit deposit field. If the value on the right side has more bits than the bit deposit
field, the system ignores the excess high-order bits when making the assignment.
Specify the variable/bit-field construct with no intervening spaces as shown:
myvar.<0:5>
Do not use bit deposit fields to pack data. Instead, declare an UNSIGNED variable and specify
the appropriate number of bits in the bit field.
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 procedure’s 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
(page 52).
CALL 205