@@ -762,19 +762,28 @@ $(GNAME HexLetter):
762
762
763
763
$(P Integers can be specified in decimal, binary, or hexadecimal.)
764
764
765
- $(P Decimal integers are a sequence of decimal digits.)
765
+ $(UL
766
+ $(LI Decimal integers are a sequence of decimal digits.)
766
767
767
- $(P $(LNAME2 binary-literals, Binary integers) are a sequence of binary digits preceded
768
+ $(LI $(LNAME2 binary-literals, Binary integers) are a sequence of binary digits preceded
768
769
by a $(SINGLEQUOTE 0b) or $(SINGLEQUOTE 0B).
769
770
)
770
771
771
- $(P C-style octal integer notation was deemed too easy to mix up with decimal notation;
772
+ $(LI C-style octal integer notation (e.g. `0167`) was deemed too easy to mix up with decimal notation;
772
773
it is only fully supported in string literals.
773
774
D still supports octal integer literals interpreted at compile time through the $(REF octal, std,conv)
774
775
template, as in $(D octal!167).)
775
- $(P Hexadecimal integers are a sequence of hexadecimal digits preceded
776
+
777
+ $(LI Hexadecimal integers are a sequence of hexadecimal digits preceded
776
778
by a $(SINGLEQUOTE 0x) or $(SINGLEQUOTE 0X).
777
779
)
780
+ )
781
+
782
+ ---
783
+ 10 // decimal
784
+ 0b1010 // binary
785
+ 0xA // hex
786
+ ---
778
787
779
788
$(P Integers can have embedded $(SINGLEQUOTE $(UNDERSCORE)) characters after a digit to improve readability, which are ignored.
780
789
)
@@ -783,6 +792,7 @@ $(GNAME HexLetter):
783
792
20_000 // leagues under the sea
784
793
867_5309 // number on the wall
785
794
1_522_000 // thrust of F1 engine (lbf sea level)
795
+ 0xBAAD_F00D // magic number for debugging
786
796
---
787
797
788
798
$(P Integers can be immediately followed by one $(SINGLEQUOTE L) or one of
0 commit comments