pTAL Reference Manual (H06.08+)
Built-In Routines
HP pTAL Reference Manual—523746-006
15-34
$DBL
duplicationcount input,output
uINT:variable
holds an initial value. At the end of the operation, duplicationcount
contains its original value plus the number of duplicate words found by
$COUNTDUPS.
duplicationcount must be an INT variable; it cannot be a STRING,
UNSIGNED, or USE variable or a bit field.
$COUNTDUPS scans a buffer from left to right until it encounters two adjacent unequal
words or until it reads maxwords words.
$DBL
$DBL converts its argument to an INT(32) value.
expression
is an expression whose value is an INT, INT(32), FIXED, REAL, REAL(64),
UNSIGNED(1-16), UNSIGNED(17-31), EXTADDR, or PROCADDR value.
Example 15-20. $COUNTDUPS Routine
LITERAL buffersize = 100;
INT .EXT buffer[ 0:buffersize-1 ];
INT maxwords;
INT duplication_count;
maxwords := maxbuff;
$COUNTDUPS(@buffer, maxwords, duplication_count);
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW Yes, if expression is a fixed
value
expression
( )
VST078.vsd
$DBL










