What it does
CreateMemblockFromFile creates FromFile on a Memblock object. It takes memID (an integer) and filename (a string), and returns nothing. That is the first of 2 forms. memID is the id you are giving a memblock: every later call names it by that number.
Syntax
1
CreateMemblockFromFile(memID integer, filename string)2
CreateMemblockFromFile(filename string) → integerParameters
| Name | Type | In forms |
|---|---|---|
| memID | integer | 1 |
| filename | string | all |
What each form returns
| 1 | CreateMemblockFromFile(1, "assets/data.dat") | nothing |
| 2 | memblockFromFile = CreateMemblockFromFile("assets/data.dat") | integer |
Example · generated
Form 1, you choose the id yourself
CreateMemblockFromFile(1, "assets/data.dat")DO Sync()LOOPForm 2, the command hands back the id
memblockFromFile = CreateMemblockFromFile("assets/data.dat")DO Sync()LOOPCreateMemblockFromFile is called with values of the types its signature asks for. 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.