Skip to content

Commit d1d9b5c

Browse files
committed
Fix octal literals
“Leading 0 does not indicate octal in Perl 6. Please use 0o12 if you mean that”
1 parent 2aaf12a commit d1d9b5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Type/Str.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ is ignored:
540540
When the C<#> flag and a precision are given in the C<%o> conversion, the
541541
precision is incremented if it's necessary for the leading "0":
542542
543-
sprintf '<%#.5o>', 012; # OUTPUT: «<000012>␤»
544-
sprintf '<%#.5o>', 012345; # OUTPUT: «<012345>␤»
543+
sprintf '<%#.5o>', 0o12; # OUTPUT: «<000012>␤»
544+
sprintf '<%#.5o>', 0o12345; # OUTPUT: «<012345>␤»
545545
sprintf '<%#.0o>', 0; # OUTPUT: «<>␤» # zero precision results in no output!
546546
547547
B<vector flag>

0 commit comments

Comments
 (0)