HP 3000 Manuals

NOT [ EDIT/3000:Reference Manual ] MPE/iX 5.0 Documentation


EDIT/3000:Reference Manual

NOT 

4-13.  NOT COMMAND 

4-14.  PURPOSE 

The NOT command reverses the flag setting after the command immediately
following the NOT command is executed.

4-15.  FORM 

The form of the NOT command is

            N[OT]

4-16.  DESCRIPTION 

The NOT command reverses the flag setting after the command following it
is executed.

For example,

     FINDQ FIRST
     WHILE
        FIND "PROGRAMMER"(+10)
        BEGIN
            NOT
            FINDQ "PROBLEMS"/*(+10)
            LIST *
            END

lists a line only if the string "PROBLEMS" is not found within 10
character positions after the string "PROGRAMMER" .  In other words, the
NOT command reverses the flag to false after the command FINDQ "PROBLEMS"
/(+10), causing the LIST * command to be skipped.  The entire WHILE
block, however, repeats until the command FIND "PROGRAMMER" (+10) (the
first flag) fails or until the SET TIME = limit value in effect is
reached.

4-17.  LIMITATIONS 

The NOT command affects only the command immediately following it and can
be used only in a WHILE block.

4-18.  EXAMPLES 

The WORK file is shown below.

     /S SHORT;T EDIT3;L ALL
         1    1-2.   WHAT IS EDIT/3000?
         2
         3    EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
         4    MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM
         5    (MPE/3000) THAT IS USED TO CREATE AND
         6    MANIPULATE ASCII FILES.
         7
         9    CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE
         9    LINES OF CHARACTERS CAN BE INSERTED, DELETED,
        10    REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE
        11    MANIPULATED BY USING EDIT/3000 COMMANDS.
        12
        13     1-2.  EDIT/3000 FEATURES
        14
        15     WITH EDIT/3000, IT IS POSSIBLE TO
        16
        17     CREATE AND BUILD A NEW FILE (CALLED A WORK FILE)
        18     BY ENTERING COMMANDS AND LINES OF TEXT FROM THE
        19     STANDARD INPUT DEVICE OR FROM A SPECIAL DISC FILE
        20     CALLED THE HOLD FILE.
        21
        22     SAVE THE WORK FILE INTO A PERMANENT FILE CALLED
        23     THE TEXT FILE.
        24
        25     CALL THE  TEXT FILE BACK INTO THE WORK FILE FOR
        26     FURTHER ADDITIONS AND/OR EDITING.
        27
        28     CHANGE ALL OCCURENCES OF A CHARACTER STRING WITH
        29     ONE COMMAND.
        30
        31     DELETE CHARACTERS AND LINES FROM THE WORK FILE.

In the following example, EDIT/3000 finds the string "EDIT/3000" in line
1, lists the line, then searches forward 20 character positions from the
first character following the string (+9).  The string "HP 3000" is not
found within this limit, the error message

     *21* STRING NOT FOUND BEFORE LIMIT AT DEPTH 4

is displayed, and EDIT/3000 executes the LIST * command, displaying the
line again.

The next occurrence of "EDIT/3000" does have the string "HP 3000"
following it within 20 character positions.  EDIT/3000 skips the LIST *
command and the line is not listed.

The iterations continue until the FIND "EDIT/3000" (+9) command fails and
the flag is set to false.

     /FINDQ FIRST
     /WHILE
     /   FIND "EDIT/3000"(+9)
     /   BEGIN
     /      NOT
     /      FINDQ "HP 3000"/*(+20)
     /      LIST *
     /      END
         1     1-2.  WHAT IS EDIT/3000?
                                     ^ (24 )
     *21*STRING NOT FOUND BEFORE LIMIT
     AT DEPTH 4
         1     1-2.  WHAT IS EDIT/3000
         3     EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
                         ^ (11 )
        11     MANIPULATED BY USING EDIT/3000 COMMANDS.
                                              ^ (32 )
     *21*STRING NOT FOUND BEFORE LIMIT
     AT DEPTH 4
          11   MANIPULATED BY USING EDIT/3000 COMMANDS.
          13   1-2.  EDIT/3000 FEATURES
                               ^ (17 )
     *21*STRING NOT FOUND BEFORE LIMIT
     AT DEPTH 4
          13   1-2.  EDIT/3000 FEATURES
          15   WITH EDIT/3000, IT IS POSSIBLE TO
                             ^ (15 )
     *21*STRING NOT FOUND BEFORE LIMIT
     AT DEPTH 4
          15   WITH EDIT/3000, IT IS POSSIBLE TO
     *21*STRING NOT FOUND BEFORE LIMIT
     AT DEPTH 2


MPE/iX 5.0 Documentation