HELP REMOVE                               Aaron Sloman, September 1979

This procedure takes one argument and searches through the database to
find the first instance of the argument. If it finds one, it removes it
from the database. If no instance is found, it generates an error. It
could be defined roughly as follows:

    define remove(item);
    vars firstbit, lastbit;
        if database matches [??firstbit ^item ??lastbit] then
            [^^firstbit ^^lastbit] -> database;
        else
            mishap('remove failure', [%item%]);
        endif
    enddefine;

This definition is incomplete; the actual REMOVE assigns the removed
item to the variable *IT.

Notice that if you try to remove something which isn't in the database,
you'll get a mishap. If you want to remove something which MAY be in the
database use *FLUSH.  But beware: FLUSH will remove everything which
matches its argument.
popdevraw

See also HELP *PRESENT, *MATCH, *IT, *ISIN, *LOOKUP, *REMOVE, *FLUSH,
    *ADD, *MATCHES, *FOREACH, *ALLPRESENT.

--- C.all/help/remove --------------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------
