Logtalk reference manual
Predicate directive: dynamic/1

dynamic/1

Description

dynamic(Functor/Arity)
dynamic(Functor1/Arity1, Functor2/Arity2, ...)
dynamic([Functor1/Arity1, Functor2/Arity2, ...])

dynamic(Functor//Arity)
dynamic(Functor1//Arity1, Functor2//Arity2, ...)
dynamic([Functor1//Arity1, Functor2//Arity2, ...])

Declares dynamic predicates and dynamic grammar rule non-terminals. Note that an object can be static and have both static and dynamic predicates/non-terminals.

Template and modes

dynamic(+predicate_indicator_term)
dynamic(+non_terminal_indicator_term)

Examples

:- dynamic(counter/1).

:- dynamic(lives/2, works/2).

:- dynamic([db/4, key/2, file/3]).