unsignedWholeNumeral : decimalDigit decimalDigit? ( ',' digitGroup )* ; digitGroup : decimalDigit decimalDigit decimalDigit ; decimalDigit : '0' .. '9' ;
Example: 1,234,567,890
Formatting parameters:
simpleUnsignedNumeral : decimalDigit+ ; decimalDigit : '0' .. '9' ;
Example: 1234567890
Formatting parameters
base16Numeral : sedecimalDigit+ ; sedecimalDigit : '0' .. '9' | 'A' .. 'F' ;
Example: 07123ABCD
signedWholeNumeral : ( '+' | '-' )? decimalDigit decimalDigit? ( ',' digitGroup )* ; digitGroup : decimalDigit decimalDigit decimalDigit ; decimalDigit : '0' .. '9' ;
Example: -1,234,567,890
Formatting parameters:
simpleUnsignedNumeral : ( '+' | '-' )? decimalDigit+ ; decimalDigit : '0' .. '9' ;
Example: 1234567890
Formatting parameters
base16Numeral : sedecimalDigit+ ; sedecimalDigit : '0' .. '9' | 'A' .. 'F' ;
Example: 0DEADBEEF
The standard IO library shall provide the following output procedures for every whole number type that is provided by the language core or by the standard library. It shall be recommended that user libraries implementing whole number types also provide these procedures.
PROCEDURE Write( f : File; n : <WholeNumberType> );
shall produce output in digit group format without padding.
PROCEDURE WriteF( f : File; n : <WholeNumberType>; w : CARDINAL );
shall produce output in digit group format right centered into a field of width n.
PROCEDURE WriteBase16( f : File; n : <WholeNumberType> );
shall produce output in base-16 format without padding.
PROCEDURE WriteFixed( f : File; n : <WholeNumberType> );
shall produce output in simple format without padding.
The compiler shall expand the WRITE and WRITEF macros when invoked with a whole number argument as follows:
WRITE( file, wholenum );
shall expand to: TypeOf(wholenum)
.Write( file, wholenum );
WRITEF( file, wholenum, n );
shall expand to: TypeOf(wholenum)
.WriteF( file, wholenum, n );
whereby TypeOf(wholenum)
is to be replaced by the name of the whole number type.
CARDINAL
LONGCARD
INTEGER
LONGINT