tags:

views:

58

answers:

1

I can change prompt_alternatives_on flag in the REPL.

  1. But how do I change this flag in .plrc?

Then I get

 permission to modify static_procedure `set_prolog_flag/2'

Goal: To not get the "More?" text for all the answers all the time. By changing the flag.

A: 

Put :- (a colon and a hypen) in front of the line to execute it when the file is loaded.

:- set_prolog_flag(key, value).

This is true of any line of code in any source file that you want to have evaluated when the file is loaded instead of considered a new fact or rule (which causes the error because it attempts to redefine set_prolog_flag/2).

Jeff Dallien
Thanks. Do you know prolog? when did you learn it?
Flinkman
Yes, I know Prolog. I started learning it in university about 5 years ago and now some Prolog coding is part of my job, though not the main part.
Jeff Dallien
ok, how do you feel about that? It's kind of rare. But extremely elegant. I think you should feel privileged. I would love to work with an AI language.
Flinkman