POKE
Syntax
Description
Stores the given (numeric) value at the specified memory address. If valueType is omitted, it is supposed to be ubyte (8 bit unsigned integer).
The value is converted to the given valueType and stored at the given Address. Type can be any numeric one (like float or integer).
Examples
It is possible to poke a decimal value (5 bytes) at a memory position:
Traditionally, in Sinclair BASIC, to store a 16 bit value the programmer does something like this:
This can be done in a single sentence in ZX BASIC:
It's faster and the recommended way.
Remarks
- This statement is Sinclair BASIC compatible.
- This statement extends the Sinclair BASIC one.
- This statement also allows parenthesis and FreeBASIC syntax