Inspect Manual

High-Level Inspect Commands
Inspect Manual429164-006
6-71
Using the IN Clause
DECIMAL displays items as decimal values.
HEXADECIMAL displays items as hexadecimal values.
ASCII displays items as printable 7-bit ASCII characters. Inspect represents
unprintable characters as a question mark followed by the character's numeric
value expressed in the current output radix. For the ASCII base, unprintable
characters are those with a decimal value less than 32 or greater than 126.
XASCII displays items as printable 8-bit extended ASCII characters. Inspect
represents unprintable characters as a question mark followed by the character's
numeric value expressed in the current output radix. For the XASCII base,
unprintable characters are those with a decimal value less than 32.
GRAPHICS displays items as characters, including control characters.
ICODE displays items as TNS instruction mnemonics, so it is invalid for PATHWAY
requester programs.
Usage Considerations
Displaying Items in Different Bases
Because the IN clause applies to all the items listed, a single DISPLAY command
cannot display one item using one base and another item using another base.
This restriction can surface when you attempt to display code in ICODE and data
in some other base. You can achieve this only indirectly, by displaying both items
in both bases; for example:
Using IN for Data Conversion
The IN format clause can be used for quick data conversion:
Examples
1. This example illustrates displaying an integer array in octal.
2. This example illustrates displaying the same array in binary.
-PRG-DISPLAY #main.label, #main.array IN ICODE ASCII
-PRG-DISPLAY "A" IN OCTAL
%101
-PRG-DISPLAY (%167) IN ASCII
?0 "w"
-PROGRAM-DISPLAY three_var IN octal
THREE_VAR[0] = %30071 5 %173 2 %1605 %131 %1067 0
-PROGRAM-DISPLAY three_var IN binary
THREE_VAR[0] = 0011000000111001 0000000000000101 0000000001111011
0000000000000010 0000001110000101 0000000001011001 0000001000110111
0000000000000000