Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
mtx/size - Return array dimensions
Synopsis
Description
Error Handling
Examples
See Also
Author
mtx/size write, ![matrix] <, write, ![matrix] ... >
Returns dimensions of one or more matrix arrays. The arguments are grouped into pairs of write and read.
The write argument may be a single register or a list sequence containing multiple registers to store the size of each successive dimension in the matrix array identified by the following matrix argument. Dimension sizes are stored in each register as an encoded psInteger value (PSUNIT_TYPE_XVALUE).
If the array contains more dimensions than registers in the write argument, then the additional dimensions will be ignored. If the array contains fewer dimensions, then the extraneous registers will be set to PSUNIT_TYPE_NULL.
If the write argument is a list sequence, then one or more arguments in the list sequence may be the NULL special register if the dimension size corresponding to that argument position is not required.
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.
mtx/size P1, P0 Returns the size of the first dimension in register P1 for the matrix array referenced in register P0. mtx/size @[P0, P1, P2], ![a] Returns the size of the first three dimensions in registers P0, P1 and P2 for the named matrix array. mtx/size @[PUSH, PUSH], ![.prose.code.default.a] Pushes the size of the first two dimensions to the program stack for the matrix array located by the given object reference. mtx/size @[NULL, NULL, P10], P0 Returns the size of the third dimension only in register P10 for the matrix array referenced in register P0.
pal_commands(5), pal_registers(5), pal_indices(5), ps_attributes(5), mtx_def(5), mtx_bsize(5), mtx_dim(5), mtx_resize(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2011 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_size (5) | 17 October 2011 |