TAL Programmer's Guide
Operands
Using Expressions
5–8 096254 Tandem Computers Incorporated
Table 5-6. Number Base Formats
Number Base Prefix Digits Allowed Example
Decimal None 0 through 9 46
Octal % 0 through 7 %57
Binary %B 0 or 1 %B101111
Hexadecimal %H 0 through 9, A through F %H2F
STRING. A STRING numeric constant is an unsigned 8-bit integer in the range 0
through 255. Examples are:
59 !Decimal base
%12 !Octal base
%B101 !Binary base
%h2A !Hexadecimal base
INT. An INT numeric constant is a signed or unsigned 16-bit integer in the range 0
through 65,535 (unsigned) or –32,768 through 32,767 (signed). Examples are:
45550 !Decimal base (unsigned)
-8987 !Decimal base (signed)
%177 !Octal base (unsigned)
-%5 !Octal base (signed)
%B1001111000010001 !Binary base
%h2f !Hexadecimal
INT(32). An INT(32) numeric constant is a signed or unsigned 32-bit integer in the
range –2,147,483,648 through 2,147,483,647, suffixed by D for decimal, octal, or binary
integers, and by %D for hexadecimal integers. Examples are:
0D !Decimal base
+14769D
-327895066d
%1707254361d !Octal base
-%24700000221D
%B000100101100010001010001001d !Binary base
%h096228d%d !Hexadecimal base
-%H99FF29%D
-%H99FF29 D !This form is allowed but not
! recommended; always include
! the % in the %D suffix