I keep running into an existence error for many different default functions in prolog (I'm using gprolog). For example...
| ?- assert(a(1)).
uncaught exception: error(existence_error(procedure,assert/1),top_level/0)
| ?- g_assign(GVarName, 0).
uncaught exception: error(instantiation_error,g_assign/2)
| ?- b_setval(A, 0).
uncaught exception: error(existence_error(procedure,b_setval/2),top_level/0)
Do I need to install something else?
Essentially, I'm trying to find a way to define a global variable. I thought something like this might be the best way...
fact(List).
predicate(List) :-
...some code...,
assert(fact(List)).
and then to invoke the "global variable" I would use fact(List)
.