mirror of
https://github.com/bobbimanners/EightBall.git
synced 2024-11-29 11:49:35 +00:00
Updated Language: Variables (markdown)
parent
77658cdd5e
commit
78fd0362c8
@ -9,6 +9,8 @@ Variables must be declared before use. Variables **must** be initialized.
|
|||||||
|
|
||||||
The first four letters of the variable name are significant, any letters after that are simply ignored by the parser.
|
The first four letters of the variable name are significant, any letters after that are simply ignored by the parser.
|
||||||
|
|
||||||
|
Variables of type word are also used to store pointers (there is no pointer type in EightBall).
|
||||||
|
|
||||||
### Arrays
|
### Arrays
|
||||||
|
|
||||||
Arrays of byte and word may be declared as follows. The mandatory initializer is used to initialize all elements:
|
Arrays of byte and word may be declared as follows. The mandatory initializer is used to initialize all elements:
|
||||||
@ -16,4 +18,9 @@ Arrays of byte and word may be declared as follows. The mandatory initializer i
|
|||||||
word myArray[100] = 1
|
word myArray[100] = 1
|
||||||
byte storage[10] = 0
|
byte storage[10] = 0
|
||||||
|
|
||||||
At present, only 1D arrays are supported, but this will be expanded in future releases.
|
**_At present, only 1D arrays are supported, but this will be expanded in future releases._**
|
||||||
|
|
||||||
|
Array elements begin from 0, so the array `storage` above has elements from 0 to 9.
|
||||||
|
|
||||||
|
storage[0] = 0; ' First element
|
||||||
|
storage[9] = 99; ' Last element
|
Loading…
Reference in New Issue
Block a user