MemblockByteSigned

Family: Memblock · 2 forms

What it does

MemblockByteSigned 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
MemblockByteSigned(memID integer, offset integer) → integer
2
MemblockByteSigned(memID integer, offset integer, value integer)

Parameters

NameTypeIn forms
memIDintegerall
offsetintegerall
valueinteger2

What each form returns

1MemblockByteSigned(memblock, 1)integer
2MemblockByteSigned(memblock, 1, 1)nothing

Example · generated

Form 1, the command hands back the id

memblock = CreateMemblock(64)DO  Print(MemblockByteSigned(memblock, 1))  Sync()LOOP

Form 2, you choose the id yourself

memblock = CreateMemblock(64)MemblockByteSigned(memblock, 1, 1)DO  Sync()LOOP

CreateMemblock is there to give the call something to act on; MemblockByteSigned 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.

43 commands in Memblock