dynamic/1¶
@adefgroup DatabasePredDyns
can only do as goal in YAP mode.
Next follow the main operations on dynamic predicates.
dynamic( + P )*
Declares predicate P or list of predicates [ P1,..., Pn] as a dynamic predicate. P must be written as a predicate indicator, that is in form Name/Arity or Module:Name/Arity.
:- dynamic @ref godU2fU_1 "god//1" 1.
a more convenient form can be used:
:- dynamic @ref sonU2fU_3 "son//3" 3, @ref fatherU2fU_2 "father//2" 2, @ref motherU2fU_2 "mother//2" 2.
or, equivalently,
:- dynamic @ref U5bUsonU2fU_3 "[son//3" 3, @ref fatherU2fU_2 "father//2" 2, @ref motherU2fU_2 "mother//2" 2].
Note:
a predicate is assumed to be dynamic when asserted before being defined.
% can only do as goal in YAP mode.%
dynamic( + P )*
Declares predicate P or list of predicates [ P1,..., Pn] as a dynamic predicate. P must be written as a predicate indicator, that is in form Name/Arity or Module:Name/Arity.
:- dynamic @ref godU2fU_1 "god//1" 1.
a more convenient form can be used:
:- dynamic @ref sonU2fU_3 "son//3" 3, @ref fatherU2fU_2 "father//2" 2, @ref motherU2fU_2 "mother//2" 2.
or, equivalently,
:- dynamic @ref U5bUsonU2fU_3 "[son//3" 3, @ref fatherU2fU_2 "father//2" 2, @ref motherU2fU_2 "mother//2" 2].
Note:
a predicate is assumed to be dynamic when asserted before being defined.