abolish/1


Description

abolish(Predicate)
abolish(Functor/Arity)

Removes a dynamic predicate from an object database. Note however that if the dynamic predicate is declared in a category the predicate will fail.

Template and modes

abolish(+predicate_indicator)

Errors

Predicate is a variable:
instantiation_error
Predicate is neither a variable nor a valid predicate indicator:
type_error(predicate_indicator, Predicate)
Functor is neither a variable nor an atom:
type_error(atom, Functor)
Arity is neither a variable nor an integer:
type_error(integer, Arity)
Predicate is statically declared:
permission_error(modify, predicate_declaration, Functor/Arity)
Predicate is a private predicate:
permission_error(modify, private_predicate, Functor/Arity)
Predicate is a protected predicate:
permission_error(modify, protected_predicate, Functor/Arity)
Predicate is a static predicate:
permission_error(modify, static_predicate, Functor/Arity)
Predicate is not declared:
existence_error(predicate_declaration, Functor/Arity)

Examples

To abolish any dynamic predicate in this:
abolish(Predicate)
To abolish a public or protected dynamic predicate in self:
::abolish(Predicate)
To abolish a public dynamic predicate in an object:
Object::abolish(Predicate)

Previous | Next | Table of Contents | Bibliography | Glossary

Last updated on: July 4, 2000