Inspect Manual

High-Level Inspect Commands
Inspect Manual429164-006
6-63
Using the AS Clause
1. This example uses the AS clause with a structure variable.
2. This example uses the AS clause with a structure template.
3. This example uses the AS clause when a 16-bit word address is stored in an
integer variable. An expression that evaluates to a 16-bit value is interpreted as a
16-bit word address.
4. This example uses the AS clause when an extended address is stored in an
INT(32) variable. An expression that evaluates to a 32-bit value is interpreted as an
extended address.
one_var.one_field := 53;
one_var.two_field := 102;
two_var ':=' "Hello World";
@string_ptr := @two_var;
@int_ptr := @one_var;
address_ext := $XADR(one_var);
address_word := @one_var;
extended_array ':=' [17, 18];
END;
-PROGRAM-DISPLAY int_ptr AS one_var
ONE_VAR =
ONE_FIELD = 53
TWO_FIELD = 102
-PROGRAM-DISPLAY int_ptr AS s^def
S^DEF =
ONE_FIELD = 53
TWO_FIELD = 102
-PROGRAM-DISPLAY (address_word) AS s^def
S^DEF =
ONE_FIELD = 53
TWO_FIELD = 102
-PROGRAM-DISPLAY (address_ext) AS s^def
S^DEF =
ONE_FIELD = 53
TWO_FIELD = 102