Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
class/test - Test classes
Synopsis
Description
Error Handling
Examples
See Also
Author
class/test ![object], class, <, class ... >
Tests a node on the nexus identified by the object register for a given list of classes. The class argument is a register or index containing either the text name of the class or a pointer to a class definition returned by the class/load instruction.
Each class argument will result in a new value being written to the SCMP and SFLG registers. If the class is assigned to the object, the result will be PSCMP_EQUAL, otherwise it will be PSCMP_NOTEQUAL.
A runtime error will occur if a register is of the wrong type or if a named class or object could not be found.
class/test P0, [psModule], [psFunction] Tests two classes against the node pointed to in register P0. The SCMP register will contain the result of the last test (psFunction) while the lowermost 2 bits of the SFLG register will tell you whether either classes are assigned.
pal_commands(5), pal_registers(5), pal_indices(5), class_load(5), attr_test(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2008 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 | class_test (5) | 1 December 2008 |