Re: interactive use, the overwhelming norm ?
Anne Ogborn <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
No, the normal thing is to write a bunch of predicates in a file, and consult that file. One of the predicates is usually called main or some such. Then you can start the program by querying main. If you want the program to run when you load it, one way is to do something like swipl -f myprogram.pl -g main where main is the name of your startup predicate Another way is to put something like this in the file :- main. If you want the program to not leave you in the swi-prolog top level when you exit you can call halt.