What it does
MemblockFloat takes memID (an integer) and offset (an integer), and answers a float. 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
MemblockFloat(memID integer, offset integer) → float2
MemblockFloat(memID integer, offset integer, value float)Parameters
| Name | Type | In forms |
|---|---|---|
| memID | integer | all |
| offset | integer | all |
| value | float | 2 |
What each form returns
| 1 | MemblockFloat(memblock, 1) | float |
| 2 | MemblockFloat(memblock, 1, 1.0) | nothing |
Example · generated
Form 1, the command hands back the id
memblock = CreateMemblock(64)DO Print(MemblockFloat(memblock, 1)) Sync()LOOPForm 2, you choose the id yourself
memblock = CreateMemblock(64)MemblockFloat(memblock, 1, 1.0)DO Sync()LOOPCreateMemblock is there to give the call something to act on; MemblockFloat 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.