ongoing work to support 0x, 0o, 0b
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-22 22:04:18 +09:00
parent 261970a1a4
commit 8a277c77c0
4 changed files with 30 additions and 55 deletions

View File

@ -74,7 +74,7 @@ k := #[10 ; 20 ]; ##ERROR: syntax error - unexpected semicolon
## a code point greater than 255 is illegal in the character literal prefix fixed with b.
printf "[%c] [#x%x] [%d]\n" '★' '★' #x2605;
printf "[%c] [0x%x] [%d]\n" '★' '★' 0x2605;
printf "[%c]\n" b'★'; ##ERROR: syntax error - wrong character literal
---
@ -82,7 +82,7 @@ printf "[%c]\n" b'★'; ##ERROR: syntax error - wrong character literal
## #b can be followed by [ or binary digits.
printf "%O\n" #b[ 10 20 30 ];
printf "%010b\n" #b0101;
printf "%010b\n" 0b0101;
printf "%O\n" #bxy; ##ERROR: syntax error - neither valid radixed number nor valid directive '#bxy'
---