Skip to content

Commit e2015cc

Browse files
committed
Add some examples of possibly confusing hexadecimal literals
1 parent 71fd6e3 commit e2015cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tokens.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ Examples of integer literals of various forms:
374374

375375
0xff;
376376
0xff_u8;
377+
0x01_f32; // integer 7986, not floating-point 1.0
378+
0x01_e3; // integer 483, not floating-point 1000.0
377379

378380
0o70;
379381
0o70_i16;

0 commit comments

Comments
 (0)