简体   繁体   中英

How write a rule to exit program in prolog?

I want to write a rule to exit prolog but how can I do this?
What should I do so that I can exit the program? I tried something like this do(exit):-halt , but halt does not work.

try and use halt(0). this also finishes swi-pl.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM