Asserts a clause as the first one for an object dynamic predicate. If the
predicate is not previously declared (using a scope directive), then a
dynamic predicate declaration is added to the object (assuming that we are
asserting locally or that the
dynamic_declarations compiler flag was
allow when the object was created or compiled).
This method may be used to assert clauses for predicates that are not declared dynamic for dynamic objects provided that the predicates are declared in this. This allows easy initialization of dynamically created objects when writing constructors.
Modes and number of proofs¶
asserta(+clause) - one
permission_error(modify, private_predicate, Name/Arity)
permission_error(modify, protected_predicate, Name/Arity)
permission_error(modify, static_predicate, Name/Arity)
permission_error(create, predicate_declaration, Name/Arity)