pTAL Conversion Guide

TAL Standard Routines
pTAL Conversion Guide527302-002
17-5
$COMP
$COMP
$COMP is a TAL routine for which pTAL has a built-in routine with the same name but
slightly different behavior.
$COMP returns the one’s complement of its argument.
expression
is an expression whose value is:
The data type of the expression returned by $COMP is the same as the data type of its
argument.
$DBL
$DBL is a TAL routine for which pTAL has a built-in routine with the same name but
slightly different behavior.
$DBL converts its argument to an INT(32) value.
TAL pTAL
An INT value An INT or INT(32) value
Example 17-4. $COMP Routine
INT i;
INT(32) j;
i := $COMP(i); ! OK in TAL and pTAL
j := $COMP(j); ! OK only in pTAL
( )
VST077.vsd
$COMP int-expression
expression( )
VST078.vsd
$DBL