FutureBasic Logo

<<    Index    >> FutureBasic

poke   statement

poke [byte] address, byteExpr
poke word address, shortIntExpr
poke int address, intExpr
poke long address, longIntExpr

Shorthand syntax:
| address, byteExpr
% address, shortIntExpr
~ address, longIntExpr

These statements copy the byteExpr, shortIntExpr, intExpr or longIntExpr value into memory starting at the memory address in address for a length of either 1, 2, 4 or 8 bytes, depending on the poke command used. address should be a pointer variable.

Usage notes: The target memory address inside address must be valid. i.e. either allocated by the compiler via a dimensioned variable or dynamically allocated heap via malloc(). For copying more than 8 bytes, see the BlockMove command below.

See also
peek; varptr; BlockMove; let