What it does
CreateMemblock brings a Memblock object into being: it is how the rest of the program comes to have one. It takes size (an integer), and answers an integer. That is the first of 2 forms.
Syntax
1
CreateMemblock(size integer) → integer2
CreateMemblock(memID integer, size integer)Parameters
| Name | Type | In forms |
|---|---|---|
| size | integer | all |
| memID | integer | 2 |
What each form returns
| 1 | memblock = CreateMemblock(64) | integer |
| 2 | CreateMemblock(1, 64) | nothing |
Example · generated
Form 1, the command hands back the id
memblock = CreateMemblock(64)DO Sync()LOOPForm 2, you choose the id yourself
CreateMemblock(1, 64)DO Sync()LOOPCreateMemblock is called and its answer is printed every frame. 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.