1
0
Fork 0
mirror of https://github.com/ratfactor/ziglings synced 2024-05-11 22:56:04 +02:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Chris Boesch 27b5d3b55f
Merge pull request #357 from ratfactor/check_patches
Fixed some broken patches
2023-08-27 19:21:42 +02:00
Chris Boesch fca59c258b Fixed some broken patches 2023-08-27 19:11:21 +02:00
Chris Boesch b209cc3f49
Merge pull request #356 from juergenhoetzel/code-point-size
Add example for Unicode Code point literal > 255

Thanks! 😄
2023-08-27 18:57:50 +02:00
Chris Boesch 6f34f7ad0e
Update README.md
Advanced usage line 'zig build -Dn=x start' deleted, because of https://github.com/ratfactor/ziglings/issues/355
2023-08-27 18:55:54 +02:00
Juergen Hoetzel 9fce9bd57f Add example for Unicode Code point literal > 255
Only Basic Latin and Latin-1 Supplement code points fit into a single
byte.
2023-08-27 12:33:33 +02:00
5 changed files with 6 additions and 7 deletions

View File

@ -114,12 +114,10 @@ Version-0.11.0-dev.4246+71dfce31b
## Advanced Usage
It can be handy to check just a single exercise or _start_ from a
single exercise:
It can be handy to check just a single exercise:
```
zig build -Dn=19
zig build -Dn=19 start
```
You can also run without checking for correctness:

View File

@ -6,7 +6,8 @@
// const a2: u8 = 0x41; // hexadecimal
// const a3: u8 = 0o101; // octal
// const a4: u8 = 0b1000001; // binary
// const a5: u8 = 'A'; // UTF-8 code point literal
// const a5: u8 = 'A'; // ASCII code point literal
// const a6: u16 = 'È€'; // Unicode code points can take up to 21 bits
//
// You can also place underscores in numbers to aid readability:
//

View File

@ -1,4 +1,4 @@
92c92
91c91
< ???.zap(???);
---
> heat_ray.zap(alien);

View File

@ -1,4 +1,4 @@
22,24c22,24
23,25c23,25
< 0o131, // octal
< 0b1101000, // binary
< 0x66, // hex

View File

@ -1,4 +1,4 @@
43c43
46c46
< const shuttle_weight: f16 = 907.18 * 2200;
---
> const shuttle_weight: f32 = 907.18 * 2200.0;