pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
int-expression
is an INT expression.
$ALPHA inspects bits <8:15> of int-expression and ignores bits <0:7>. It tests for an
alphabetic character according to the following criteria:
int-expression >= "A" AND int-expression <= "Z" OR
int-expression >= "a" AND int-expression <= "z"
If an alphabetic character occurs, $ALPHA sets the condition code indicator to CCE (condition
code equal to). If you plan to check the condition code, do so before an arithmetic operation or
assignment occurs.
If the character passes the test, $ALPHA returns a -1 (true); otherwise, it returns a 0 (false).
int-expression can include STRING and UNSIGNED(1-16) operands, as described in
“Expression Arguments” at the beginning of this section.
Example 232 $ALPHA Routine
STRING some_char;
IF $ALPHA (some_char) THEN ... ; ! Test for alphabetic character
$ASCIITOFIXED
$ASCIITOFIXED converts an ASCII value to a FIXED value.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
YesSets condition code
NoSets $CARRY
YesSets $OVERFLOW
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.
292 Built-In Routines