What it does
MemblockInt takes memID (an integer) and offset (an integer), and answers an integer. That is the first of 2 forms. memID is the id of a memblock, the one CreateMemblock returned: it is how the call knows what to act on.
Syntax
1
MemblockInt(memID integer, offset integer) → integer2
MemblockInt(memID integer, offset integer, value integer)Parameters
| Name | Type | In forms |
|---|---|---|
| memID | integer | all |
| offset | integer | all |
| value | integer | 2 |
What each form returns
| 1 | MemblockInt(memblock, 1) | integer |
| 2 | MemblockInt(memblock, 1, 1) | nothing |
Example · generated
Form 1, the command hands back the id
memblock = CreateMemblock(64)DO Print(MemblockInt(memblock, 1)) Sync()LOOPForm 2, you choose the id yourself
memblock = CreateMemblock(64)MemblockInt(memblock, 1, 1)DO Sync()LOOPCreateMemblock is there to give the call something to act on; MemblockInt is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.