I've been trying to use both asserta
and assertz
in my program and the compiler does not stop telling me
No permission to modify static procedure 'asserta / 1'
I've been reading other messages and theoretically should be solved by saying: -dynamic the problem is that I still get error, this is the code I used in an example to try to see why it fails.
prueba(abc).
prueba(123).
:- dynamic prueba/1.
asserta(prueba('666')).
I have tried placing the dynamic in another site, but nothing, both with asserta
and with assertz
and I get an error and I do not know why, I have also tried removing the single quotes ''.
It only leaves me with assert
the problem is that assert
does not do anything, when checking then the facts that make true test does not appear the one introduced.
I was asking because the truth that I am blocking is that I do not know what to do, because any example that I see, the asserta is used in runtime not in the program itself and only the use of dynamic is mentioned without giving a complete example.