mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
Document that underscores in numbers is permitted.
This commit is contained in:
@@ -1431,6 +1431,9 @@ that the \I{$, prefix}\c{$} prefix does double duty as a prefix on
|
||||
identifiers (see \k{syntax}), so a hex number prefixed with a \c{$}
|
||||
sign must have a digit after the \c{$} rather than a letter.
|
||||
|
||||
Numeric constants can have underscores (\c{_}) interspersed to break
|
||||
up long strings.
|
||||
|
||||
Some examples:
|
||||
|
||||
\c mov ax,100 ; decimal
|
||||
@@ -1440,6 +1443,7 @@ Some examples:
|
||||
\c mov ax,777q ; octal
|
||||
\c mov ax,777o ; octal again
|
||||
\c mov ax,10010011b ; binary
|
||||
\c mov ax,1001_0011b ; same binary constant
|
||||
|
||||
|
||||
\S{chrconst} \i{Character Constants}
|
||||
@@ -1536,6 +1540,9 @@ digits, period, optionally more hexadeximal digits, then optionally a
|
||||
\c{P} followed by a \e{binary} (not hexadecimal) exponent in decimal
|
||||
notation.
|
||||
|
||||
Underscores to break up groups of digits are permitted in
|
||||
floating-point constants as well.
|
||||
|
||||
Some examples:
|
||||
|
||||
\c db -0.2 ; "Quarter precision"
|
||||
|
||||
Reference in New Issue
Block a user