Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
mtx/get - Get value from within a matrix array
Synopsis
Description
Error Handling
Examples
See Also
Author
mtx/get write, ![matrix], dim
Looks up a value within the matrix array identified by the matrix argument and copies the value, storing the result as a PSUNIT_TYPE_XVALUE in the write register. The element to read is identified by the dimensions dim, which takes the same format as for the mtx/def instruction. See mtx_def(5).
Besides using mtx/get, it is also possible to read elements within a matrix array by using a matrix pointer as described in ps_matrix(5). This has the advantage that the attribute may have maths operations performed on it, or may be used in a comparison, without having to duplicate the data.
A runtime error is generated if an argument is of the wrong type, or if a referenced object does not exist in the nexus or does not point to a matrix array, or if dim is out of bounds.
mtx/get P0, P1, @[#3, #0] Copies the element in index position (3, 0) in the matrix array pointed to by register P1 and stores as a PSUNIT_TYPE_XVALUE in register P0.
pal_commands(5), pal_registers(5), pal_indices(5), ps_attributes(5), ps_matrix(5), mtx_def(5), mtx_set(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2018 Mark R. Bannister <cambridge@users.sourceforge.net>.
This is free software and can be downloaded from prose.sourceforge.net; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
PAL 1.0 | mtx_get (5) | 17 January 2018 |