sitelogo
dynamic

The directive 'dymamic' is used to declare a predicate that can be modified during later program execution.

See also: '-dynamic' option of minervac .

:- dynamic(aa/1).

list_aa :- aa(X), writeq(aa(X)),nl, flush_output, fail ; true.

remove_first :- retract(aa(_)).

add_top :- asserta(aa(300)).

add_bottom :- assertz(aa(xyz)).

aa(1). aa(2). aa(3).


Darueber read on...
scroll to top managed with ubiCMS