HP 3000 Manuals

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


Symbolic Debugger/iX User's Guide

Modifying Data 

When you need to alter the value of a variable, array item or pointer,
use the mov (move) command for HP COBOL II programs.  The mov (move)
command requires a source and destination.  The source can be any
non-edited field, a string literal, a number, a named constant ("spaces"
or "blanks"), or an expressions involving any of these data elements.
The destination can be any non-edited field.

The following example sets y to the value of the expression x+24.

     mov x+24 to y

For HP FORTRAN 77, HP Pascal, and HP C programs, use the p (print)
command followed by an expression that contains an assignment operator.
Enter the expression in the same syntax as the language in which the
program is written.

This example changes the value of the variable A1 to 30 (HP C or HP
FORTRAN 77):

     >p A1=30

The following example sets the variable j to the value of the expression
j + 17:

     >p j = j + 17

In HP Pascal, this same example is:

     >p j := j + 17



MPE/iX 5.0 Documentation