% use the directive 'dynamic' to declare a predicate that can be...
ˆÚ“®
ŽŸ‚Ö ‘O‚Ö
ã‚Ö Åã
ŽQl
dynamic
external
include
package
init
ƒCƒtƒRƒ“ƒsƒ…[ƒ^ > MINERVA > —á‘èƒvƒƒOƒ‰ƒ€ > MINERVA‚Ì“Á’¥ > Žw—ß > dynamic

dynamic

% use the directive 'dynamic' to declare a predicate that can be % modified during later program execution

:- dynamic(aa/1).

main(_) :- list_aa, nl, remove_first, list_aa, nl, add_top, list_aa, nl, add_bottom, list_aa.

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).

‘±‚­..
MINERVA
ifcomputer logo
f
Expert Services on the Web
Œ¾Œê
English
Japanese
ƒT[ƒo[
USA
Japan
ƒTƒCƒgƒ}ƒbƒv
õˆø
–ÚŽŸ
‘S‘Ì–ÚŽŸ
‘S‘Ìõˆø
ˆóüŒü‚«
imode
PDA
’Tõ
document: http://www.ifcomputer.co.jp/MINERVA/ExamplePrograms/MinervaFeatures/Directives/dynamic/home_jp.html
published 2008/7/21 update 2001/3/22 (c) 1996-2006 IF Computer Japan
IF Computer §113-0022 Tel 03-5814-3352 ifcj@ifcomputer.co.jp
Customer Support “Œ‹ž“s•¶‹ž‹æç‘Ê–Ø5-28-2   http://www.ifcomputer.co.jp
–`“ª‚Ö managed with ubiCMS