User defined types (or structs in other languages) can hold more than one variable type of a fixed byte length. I suggest implementing the TYPE directive similarly to the QB style:
TYPE typename
DIM variable1 AS <type>
DIM variable2 AS <type>
ENDTYPE
Variables may then be defined as the new type:
DIM my_var AS typename
Preferably, arrays should be supported both within type definitions and variable definitions, i. e. a type can hold arrays as well as an array can be of a user defined type:
TYPE typename
DIM variable[10] AS byte
ENDTYPE
DIM my_var[10] AS typename
The above example would create an array of 10 elements each of these elements holding an array of 10 bytes.
Using types will only be possible in explicit mode (see #100).
User defined types (or structs in other languages) can hold more than one variable type of a fixed byte length. I suggest implementing the
TYPE
directive similarly to the QB style:Variables may then be defined as the new type:
Preferably, arrays should be supported both within type definitions and variable definitions, i. e. a type can hold arrays as well as an array can be of a user defined type:
The above example would create an array of 10 elements each of these elements holding an array of 10 bytes.
Using types will only be possible in explicit mode (see #100).