HP 3000 Manuals

Swap Words [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Swap Words 

Purpose 

Swaps a word with the next word.

Default Syntax 

%

Description 

This command exchanges the current word or portion of a word with the
adjacent word to the right of the cursor.

Word Definition 

HP EDIT enables you to specify the type of characters that constitute an
HP EDIT word.  There are four possible word definitions.  You can specify
a definition other than the default value by changing the value of the
Word Category parameter from the Set Options screen.

The following word definition options are available: 

[a-zA-Z0-9_'-]        Words consist of upper and lowercase letters,
                      digits, underscores, apostrophes, and hyphens.
                      Words are separated by spaces and any
                      non-alphanumeric characters besides the underscore,
                      apostrophe, or hyphen.  This is the default
                      definition.

[a-zA-Z0-9_]          Words consist of upper and lowercase letters,
                      digits and underscores.  Words are separated by
                      spaces and any non-alphanumeric characters besides
                      the underscore.

[a-zA-Z0-9]           Words consists of upper and lowercase letters as
                      well as digits.  Words are separated by spaces and
                      any non-alphanumeric characters.

[~ ]                  Words consist of any non-space characters separated
                      by spaces.

Procedure 

To swap adjacent words: 

   1.  Move the cursor to the first letter of a word or portion of a word
       to be swapped with the next word.

   2.  Press the % key.  HP EDIT swaps the positions of the two words.

Example 

To swap the last two words in the following sentence: 

            The last two words are in the order wrong.

   1.  Move the cursor to the letter o as shown.

   2.  Press the % key.  HP EDIT swaps the words as shown:

            The last two words are in the wrong order.

Related Commands 

       Swap Character
       Swap Line



MPE/iX 5.0 Documentation