Test Pointer (TESTPTR)


Bound program access

Built-in number for TESTPTR is 538. TESTPTR ( source_pointer : pointer(16) test_type : literal(1) OR literal(4) ) : signed binary(4) /* return_code */

Description

Test the pointer specified by source pointer in the manner specified by test type. The value of the return code is determined by test type.

The test type operand may be declared as a literal of any scalar data type. If test type is a 4 byte literal, only the least significant byte is used to determine the operation to be performed. The remaining bytes must be binary zero.

Test Type Description
Hex 00 Test the source pointer procedure pointer to see if it points to a procedure requiring optimized procedure parameter passing. If source pointer is a null pointer value then a pointer does not exist  (hex 2401) exception is signalled. If source pointer is not a procedure pointer then a pointer type invalid  (hex 2402) exception is signalled. If source pointer is a procedure pointer, but it identifies an activation which does not exist then an object destroyed  (hex 2202) exception is signalled. When an exception is signalled, the value of return code is undefined. When an exception is not signalled, the value of return code will be:
0 = source pointer points to a procedure that does not require optimized procedure parameter passing. That is, the procedure may be safely called without argument optimization.
1 = source pointer points to a procedure requiring optimized parameter passing.
Hex 01 Test the source pointer to see if it points to teraspace. If source pointer is a null pointer value then a pointer does not exist  (hex 2401) exception is signalled. If source pointer is not a space pointer then a pointer type invalid  (hex 2402) exception is signalled. When an exception is signalled, the value of return code is undefined. When an exception is not signalled, the value of return code will be:
0 = source pointer does not point to teraspace.
1 = source pointer points to teraspace.
Hex 02-FF Reserved.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

22 Object Access

24 Pointer Specification

44 Protection Violation