1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-25 03:16:44 +00:00

Arrays with elements larger than one byte

This commit is contained in:
Karol Stasiak
2019-07-10 16:51:12 +02:00
parent 65338555ad
commit 6d499f3623
25 changed files with 603 additions and 158 deletions
+9
View File
@@ -238,6 +238,15 @@ an access to the element of the array `a` at the location assigned to the key `i
* otherwise: a compile error
Note that you cannot access a whole array element if it's bigger than 2 bytes, but you can access its fields or take its pointer:
array(int32) a[6]
a[2] // not ok
a[2].b0 // ok
a[2].loword // ok
a[2].pointer // ok
## Built-in functions
* `not`: negation of a boolean expression
-1
View File
@@ -129,7 +129,6 @@ Since 0.3.4, only const arrays can be allocated to ROM, non-const arrays are all
and their contents are uninitialized before a call to `init_rw_memory`. See [the ROM vs RAM guide](../api/rom-vs-ram.md).
* `<element type>`: type of the elements of the array.
It must be of size 1 byte.
If omitted, the default is `byte`.
* `<size>`: either a constant number, which then defines the size of the array,