CreateMemblock

Family: Memblock · 2 forms

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) → integer
2
CreateMemblock(memID integer, size integer)

Parameters

NameTypeIn forms
sizeintegerall
memIDinteger2

What each form returns

1memblock = CreateMemblock(64)integer
2CreateMemblock(1, 64)nothing

Example · generated

Form 1, the command hands back the id

memblock = CreateMemblock(64)DO  Sync()LOOP

Form 2, you choose the id yourself

CreateMemblock(1, 64)DO  Sync()LOOP

CreateMemblock 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.

43 commands in Memblock