Inspect Manual

High-Level Inspect Commands
Inspect Manual429164-006
6-41
Examples
2. This example shows the usage of the WHOLE clause with the DISPLAY command
on the same array of 8 elements. Specifying the WHOLE clause will cause the
elements in the array to be displayed in string format.
3. This example shows the usage of the PLAIN clause with the DISPLAY command
on the same array of 8 elements. Notice that by specifying the PLAIN clause, the
name of the item, in this case arr, was not displayed.
4. This example shows the usage of the FOR clause with the DISPLAY command.
5. This example shows the usage of the DISPLAY command on a structure with two
fields.
6. This example shows the usage of the AS clause with the DISPLAY command.
7. This example shows the display of a string array.
8. This example shows the display of a string pointer.
-EX2OBJ-DISPLAY arr WHOLE
ARR[0] = "09" ?0 ?5 ?0 "{" ?0 ?2 ?3 ?133 ?0 "Y" ?2 "7" ?0 ?0
-EX2OBJ-DISPLAY arr PLAIN
12345 5 123 2 901 89 567 0
-EX2OBJ-DISPLAY arr FOR 5
ARR[0] = 12345 5 123 2 901
-PROGRAM-DISPLAY def^one
DEF^ONE =
ONE^FIELD = 1
TWO^FIELD = 22
-PROGRAM-DISPLAY def^one.two^field
DEF^ONE.TWO^FIELD = 22
-PROGRAM-DISPLAY arr AS s^def
S^DEF =
ONE^FIELD = 12345
TWO^FIELD = 5
T-PROGRAM-DISPLAY s1
S1[0] = "example"
-PROGRAM-DISPLAY string_ptr
STRING_PTR = "e"
-PROGRAM-DISPLAY string_ptr[0:6]
STRING_PTR[0] = "example"
-PROGRAM-DISPLAY string_ptr FOR 7 BYTES
STRING_PTR[0] = "example"