Swap Characters [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Swap Characters
Purpose
Swaps the cursor character with the next character.
Default Syntax
~
Description
This command exchanges a cursor character or blank space with the
adjacent character or blank space to the right of the cursor. You can
execute the command anywhere on a line except when the cursor is on the
last character of the line. If you attempt to execute the command when
the cursor is at this location, HP EDIT does not modify the text and
displays an error message.
Procedure
To swap adjacent characters:
1. Move the cursor to the character to be swapped with the next
character.
2. Press the ~ key. HP EDIT swaps the positions of the two
characters.
Example
To swap the characters 1 and 2 in the following sentence:
The routine consists of 12 lines.
1. Move the cursor to the 1 as shown.
2. Press the ~ key. HP EDIT swaps 1 and 2 as shown:
The routine consists of 21 lines.
Related Commands
Swap Word
Swap Line
MPE/iX 5.0 Documentation