Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
Whole Number FormattingUnsigned Whole NumbersDigit Group formatunsignedWholeNumeral : decimalDigit decimalDigit? ( ',' digitGroup )* ; digitGroup : decimalDigit decimalDigit decimalDigit ; decimalDigit : '0' .. '9' ; Example: 1,234,567,890 Formatting parameters:
Simple formatsimpleUnsignedNumeral : decimalDigit+ ; decimalDigit : '0' .. '9' ; Example: 1234567890 Formatting parameters
Base-16 formatbase16Numeral : sedecimalDigit+ ; sedecimalDigit : '0' .. '9' | 'A' .. 'F' ; Example: 07123ABCD Signed Whole NumbersDigit Group formatsignedWholeNumeral : ( '+' | '-' )? decimalDigit decimalDigit? ( ',' digitGroup )* ; digitGroup : decimalDigit decimalDigit decimalDigit ; decimalDigit : '0' .. '9' ; Example: -1,234,567,890 Formatting parameters:
Simple formatsimpleUnsignedNumeral : ( '+' | '-' )? decimalDigit+ ; decimalDigit : '0' .. '9' ; Example: 1234567890 Formatting parameters
Base-16 formatbase16Numeral : sedecimalDigit+ ; sedecimalDigit : '0' .. '9' | 'A' .. 'F' ; Example: 0DEADBEEF IO Procedures for Whole Number typesThe 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.
shall produce output in digit group format without padding.
shall produce output in digit group format right centered into a field of width n.
shall produce output in base-16 format without padding.
shall produce output in simple format without padding. Mapping of WRITE and WRITEF macrosThe compiler shall expand the WRITE and WRITEF macros when invoked with a whole number argument as follows:
whereby Affected Types
|