This page summarizes the lexical syntax for Format specifiers.
StringFormat := IntegerLiteral | {EqualSpace StringBody* StringTail}
StringBody := {Character | Separator} Repeat
StringTail := [Character '#'] EqualSpace
Separator := '_' | '.' | ',' | '-' | '/'
EqualSpace := {('=' Printable Repeat)* | (' ' Repeat)}*
Character := 'L' | 'U' | 'C' | 'X' | 'l' | 'u' | 'c' | 'x'
Repeat := ['1' to '9' ['0' to '9']]
Printable := ' ' to '~'
Decimal Integer Value Format
IntegerFormat := EqualSpace {DecimalNumber | Character} EqualSpace
Character := 'L' | 'U' | 'C' | 'l' | 'u' | 'c'
DecimalNumber := Mantissa ['#'] [Fraction]
Mantissa := Sign ['$'] {ZeroNull [DecimalComma]} | DecimalComma
Sign := ['M' | 'm' | 'S' | 's']
ZeroNull := (Zero ({'_'* | ','} Zero)*) | (Null ({'_'* | ','} Null)*)
DecimalComma := Decimal ({'_'* | ','} Decimal)*
Fraction := '.' ZeroUnder {Zero | DecimalUnder | (NullUnder Null)}
DecimalUnder := (Decimal '_'*)* Decimal
ZeroUnder := (Zero '_'*)*
NullUnder := (Null '_'*)*
Decimal := {'D' | 'd'} Repeat
Zero := {'Z' | 'z'} Repeat
Null := {'N' | 'n'} Repeat
Bitwise Integer Value Format
BitwiseNumber := EqualSpace ['#'] {ZeroUnder | NullUnder} BitwiseRadiax EqualSpace
BitwiseRadix := {HexRadix | OctalRadix | BinaryRadix} ['#']
HexRadix := Hex ('_'* Hex)*
OctalRadix := Octal ('_'* Octal)*
BinaryRadix := Binary ('_'* Binary)*
Hex := {'H' | 'h'} Repeat
Binary := {'B' | 'b'} Repeat
Octal := {'O' | 'o'} Repeat
Decimal Real Value Format
RealFormat := EqualSpace DecimalNumber EqualSpace
Scientific Decimal Real Value Format
SciFormat := EqualSpace SciMantissa Fraction Exponent EqualSpace
SciMantissa := Sign NullUnder DecimalUnder
Exponent := {'E' | 'e'} Sign {'N' | 'n'}* {'D' | 'd'}* ['#']
Scientific Hexadecimal Real Value Format
HexSciFormat := EqualSpace Sign HexReal HexExponent EqualSpace
HexReal := ['#'] '1.' HexRadix ['#']
HexExponent := {'P' | 'p'} Sign Hex+ ['#']
Form Function
Procedure File Syntax