Inspect Manual
High-Level Inspect Commands
Inspect Manual—429164-006
6-67
Using the FORMAT Clause
4. This example displays eight bytes of str in hexadecimal.
5. This example displays the first 33 (value of str^blen) bytes of str.
6. This example displays the first 10 words of struct^x in ASCII (note that “-” is the
ASCII equivalent of 45, which is the value of struct^x.i).
7. This example displays the first 45 (value of sstruct^x.i) bytes of struct^x.
Using the FORMAT Clause
The FORMAT clause directs Inspect to format a list of items using the operating
system formatter.
item [ , item ]
specifies the list of items you want to display.
-PROGRAM-DISPLAY str FOR 8 IN HEX
STR[0] = %H45 %H78 %H61 %H6D %H70 %H6C %H65 %H20
-PROGRAM-DISPLAY str FOR str^blen
STR[0] = "Example text number two"
-PROGRAM-DISPLAY struct^x FOR 10 WORDS IN ASCII
STRUCT^X = ?0 ?26 "This is example nu"
-PROGRAM-DISPLAY struct^x FOR struct^x.i BYTES
STRUCT^X = ?0 ?26 "This is example number o"
DISPLAY item [ , item ]... { FORMAT | FMT } format-list
item: one of
display-data [ WHOLE ] [ PLAIN ] [ FOR group-spec ]
display-code [ WHOLE ] [ PLAIN ] [ FOR group-spec ]
REGISTER register-item [ TYPE display-type ]
spi-buffer
spi-token [ AS data-type ] [ FOR count ]
string
( expression )
VALUE value-list [ TYPE display-type ]
format-list:
an edit-descriptor list for the operating system formatter