mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-09 11:40:46 -05:00
Merge pull request 'Fixed unicode literal' (#55) from i52 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/55
This commit is contained in:
commit
6b46b26c22
1 changed files with 6 additions and 6 deletions
|
@ -2,12 +2,12 @@
|
||||||
// Zig lets you express integer literals in several convenient
|
// Zig lets you express integer literals in several convenient
|
||||||
// formats. These are all the same value:
|
// formats. These are all the same value:
|
||||||
//
|
//
|
||||||
// const a1: u8 = 65; // decimal
|
// const a1: u8 = 65; // decimal
|
||||||
// const a2: u8 = 0x41; // hexadecimal
|
// const a2: u8 = 0x41; // hexadecimal
|
||||||
// const a3: u8 = 0o101; // octal
|
// const a3: u8 = 0o101; // octal
|
||||||
// const a4: u8 = 0b1000001; // binary
|
// const a4: u8 = 0b1000001; // binary
|
||||||
// const a5: u8 = 'A'; // ASCII code point literal
|
// const a5: u8 = 'A'; // ASCII code point literal
|
||||||
// const a6: u16 = 'Ȁ'; // Unicode code points can take up to 21 bits
|
// const a6: u16 = '\u{0041}'; // Unicode code points can take up to 21 bits
|
||||||
//
|
//
|
||||||
// You can also place underscores in numbers to aid readability:
|
// You can also place underscores in numbers to aid readability:
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue