doc and opening borders

This commit is contained in:
Irmen de Jong
2025-09-20 02:30:56 +02:00
parent ad0c767ea8
commit 19f19f3880
4 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ dealing with all of them separately. You first define the struct type like so::
You can use boolean fields, numeric fields (byte, word, float), and pointer fields (including str, which is translated into ^^ubyte).
You cannot nest struct types nor put arrays in them as a field.
Fields in a struct are 'packed' (meaning the values are placed back-to-back in memory), and placed in memory in order of declaration. This guarantees exact size and place of the fields.
``sizeof()`` knows how to calculate the size of a struct.
``sizeof()`` knows how to calculate the combined size of a struct, and ``offsetof()`` can be used to get the byte offset of a given field in the struct.
The size of a struct cannot exceed 1 memory page (256 bytes).
You can copy the whole contents of a struct to another one by assigning the dereferenced pointers::