mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
figure out integers
After researching int_least8_t, int_fast8_t, and friends, it seems that rust's idea of only having fixed integer types is the way to go.
This commit is contained in:
parent
024052b448
commit
3a1defa67b
1 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,6 @@ readable, safe, optimal, and concise code to solve any computing problem.
|
||||||
* test framework to test for compile errors
|
* test framework to test for compile errors
|
||||||
* Simple .so library
|
* Simple .so library
|
||||||
* Multiple files
|
* Multiple files
|
||||||
* figure out integers
|
|
||||||
* inline assembly and syscalls
|
* inline assembly and syscalls
|
||||||
* running code at compile time
|
* running code at compile time
|
||||||
* implement a simple game using SDL2
|
* implement a simple game using SDL2
|
||||||
|
|
@ -45,6 +44,7 @@ readable, safe, optimal, and concise code to solve any computing problem.
|
||||||
|
|
||||||
zig | C equivalent | Description
|
zig | C equivalent | Description
|
||||||
-------|--------------|-------------------------------
|
-------|--------------|-------------------------------
|
||||||
|
bool | bool | unsigned 1-bit integer
|
||||||
i8 | int8_t | signed 8-bit integer
|
i8 | int8_t | signed 8-bit integer
|
||||||
u8 | uint8_t | unsigned 8-bit integer
|
u8 | uint8_t | unsigned 8-bit integer
|
||||||
i16 | int16_t | signed 16-bit integer
|
i16 | int16_t | signed 16-bit integer
|
||||||
|
|
@ -56,8 +56,8 @@ zig | C equivalent | Description
|
||||||
f32 | float | 32-bit IEE754 floating point
|
f32 | float | 32-bit IEE754 floating point
|
||||||
f64 | double | 64-bit IEE754 floating point
|
f64 | double | 64-bit IEE754 floating point
|
||||||
f128 | long double | 128-bit IEE754 floating point
|
f128 | long double | 128-bit IEE754 floating point
|
||||||
isize | ssize_t | signed pointer sized integer
|
isize | intptr_t | signed pointer sized integer
|
||||||
usize | size_t | unsigned pointer sized integer
|
usize | uintptr_t | unsigned pointer sized integer
|
||||||
|
|
||||||
### Grammar
|
### Grammar
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue