Dear Bambang,
You missed the fact that Prolog operates in a different mode
when reading from the user than it does when reading a file.
If it reads a file, all terms are by default interpreted as
new clauses that are added to the database. Only terms that
start with `:-` are interpreted as commands (well, directives,
but let me keep things simple).
In contrast, the toplevel interprets any term typed as a
_query_ and will try to prove it. If you really want to
add something to the database, you can either use assertz/1:
?- assertz(http:location(assets, root('assets'), [])).
or consult `user`:
?- [user].
|: http:location(assets, root('assets'), []).
|: <type Control-D>
?-
Hope this helps
--- Jan
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swi-prolog+...@googlegroups.com
> <mailto:
swi-prolog+...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/swi-prolog.
> For more options, visit
https://groups.google.com/d/optout.