pTAL Reference Manual (H06.03+)
Built-In Routines
HP pTAL Reference Manual—523746-005
15-24
$ASCIITOFIXED
$ASCIITOFIXED
$ASCIITOFIXED converts an ASCII value to a FIXED value.
bufferaddr input,output
BADDR:variable
is the byte address from which $ASCIITOFIXED reads ASCII digits. When
$ASCIITOFIXED completes, bufferaddr contains the address following the
last byte read.
maxdigits input
uINT:value
is the maximum number of ASCII digits to read from bufferaddr.
remainingdigits output
uINT:variable
is the number of bytes that $ASCIITOFIXED did not convert because it
encountered a nonnumeric ASCII byte. remainingdigits must be an INT
variable; it cannot be a STRING, UNSIGNED, or USE variable or a bit field.
Example 15-10. $ALPHA Routine
STRING some_char;
IF $ALPHA (some_char) THEN ... ; ! Test for alphabetic character
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code Yes
Sets $CARRY No
Sets $OVERFLOW Yes
$ASCIITOFIXED (
bufferaddr
, ,
maxdigits
) ;qvalueout
qvaluein
,
VST606.vsd
remainingdigits










