HP 3000 Manuals

Displaying Data [ Symbolic Debugger/iX User's Guide ] MPE/iX 5.0 Documentation


Symbolic Debugger/iX User's Guide

Displaying Data 

Whenever program execution pauses, you can display the contents of simple
variables, arrays, structures and pointers.

For HP COBOL II programs, use the disp (display) command.  You can
display simple items, fields, array elements, and expressions.  Types of
items displayed can be edited or non-edited.

The following example displays the variable X:

     disp X

For HP FORTRAN 77, HP Pascal, or HP C programs, use the p (print)
command.  Various options and formats are available for greater control
over displaying data.

The example below shows how to display the value of the variable fob in a
form that is consistent with the language used (if the variable is an
integer variable, for example, the value is expressed in decimal form):

     >p fob

To display a variable or expression in a hexadecimal format, enter a
print command in a form similar to this:

     >p fob\x

To interpret an expression as a long integer, enter the print command in
this form:

     >p hanoi\D

To display the next data item using the current format (the format most
recently used) and data item size, enter the print command in this form:

     >p+

This interprets the next sequential data item after the one previously
printed.

To display the next data item using a format different from the current
one, use this form:

     >p+ \x

To display the previous data item using the current format and data item
size, enter the print command in this form:

     >p-

To display the previous data item using a format different from the
current one, use this form:

     >p- \x

p+ and p- are best used to traverse the elements of an array.

To display the variable used with the last command, enter:

     >p .

To display the contents of the location that is 30 bytes ahead of the
last displayed data item in memory (HP C), enter:

     >p *(&.+30)

This assumes the specified location begins a data item of the same type
and size.



MPE/iX 5.0 Documentation