File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,18 @@ There are two main syntax forms for C<Int> literals
13
13
123 # Int in decimal notation
14
14
:16<BEEF> # Int in radix notations
15
15
16
- Both forms allow underscores between any two digits which can serve as visual
16
+ For your convenience common radix forms come with a prefix shortcut.
17
+
18
+ say so :2<11111111> == 0b11111111 == :8<377> == 0o377 == 255 == 0d255 == :16<ff> == 0xff;
19
+ # OUTPUT « True »
20
+
21
+ All forms allow underscores between any two digits which can serve as visual
17
22
separators, but don't carry any meaning:
18
23
19
- 5_00000 # five Lakhs
20
- 500_000 # five hundred thousand
24
+ 5_00000 # five Lakhs
25
+ 500_000 # five hundred thousand
26
+ 0xBEEF_CAFE # a strange place
27
+ :2<1010_1010> # 0d170
21
28
22
29
= head1 Methods
23
30
You can’t perform that action at this time.
0 commit comments