- Name:
-
readtable
- Syntax:
-
READTABLE location,variable {, variable, variable...}
Location - is a variable/constant specifying the address.
Variable - receives the byte value stored at the table location.
- Description:
-
Retrieve the value from an embedded lookup table.
Some PICAXE chips enable lookup data (e.g. LCD messages) to be embedded in a table within the program (via the table command). This is a very efficient way of storing data. See the 'table' command for more details.
Blocks of data may also be transferred to RAM via the tablecopy command.
When a data table is defined in a program code slot with the X2 parts, the data table is accessible only to the program within that slot. Each program slot using readtable commands should have its own 'table' defined.
18M2 Firmware
Please note the 'readtable' command is only supported for 18M2 firmware D.x (PICAXE chips labelled 18M2+) and is not available for use with 18M2 firmware 2.x (PICAXE chips labelled 18M2).
The PICAXE compiler will syntax check code for an 18M2 as correct when using the 'readtable' command but will generate an error when an attempt is made to download into an 18M2 with firmware 2.x.