mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Introduce "array[N] T" and "slice T" type syntax
This commit is contained in:
1 parent
2b91e7861c
commit
d33db6dae0
15 files changed
+83
-68
No files matched your search
@@ -78,9 +78,9 @@ Converting an expression `x` to the type `T` is written as `x as T`.
|
||||
|
||||
## Types
|
||||
|
||||
Types read from left to right: `ptr [100] u32` is a pointer to a 100-element
|
||||
array of unsigned 32-bit integers. `ptr` here means a non-null pointer. Use
|
||||
`nptr` for a nullable pointer type.
|
||||
Types read from left to right: `ptr array [100] u32` is a pointer to a
|
||||
100-element array of unsigned 32-bit integers. `ptr` here means a non-null
|
||||
pointer. Use `nptr` for a nullable pointer type.
|
||||
|
||||
Integer types can also be refined: `var x u32[10..20]` defines a variable x
|
||||
that is stored as 4 bytes (32 bits) and can be combined arithmetically (e.g.
|
||||
|
||||
Reference in new issue
Block a user