pTAL Reference Manual (H06.03+)

Built-In Routines
HP pTAL Reference Manual523746-005
15-52
$HIGH
$HIGH
$HIGH converts the high-order (leftmost) 16 bits of an INT(32) or EXTADDR value to
an INT value.
dbl-expression
is an expression whose value is INT(32) or EXTADDR.
$HIGH returns the high-order 16 bits of dbl-expression and preserves the sign bit.
$HIGH does not cause overflow.
$IFIX
$IFIX converts a signed INT value to a FIXED(fpoint ) value.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 15-41. $HIGH Routine
INT a;INT(32) b;
INT .EXT c;
EXTADDR d;
a := $HIGH(b); ! OK: b is INT(32)
a := $HIGH(@c); ! OK: @c is EXTADDR
a := $HIGH(@b); ! ERROR: @b is WADDR
a := $HIGH(c); ! ERROR: c is INT
a := $HIGH(d); ! OK: d is EXTADDR
( )
VST091.vsd
$HIGH
dbl-expression
( )
VST092.vsd
,
$IFIX
int-expression fpoint