How to change prompt_alternatives_on flag in prolog from .plrc?
-
10-07-2019 - |
Question
I can change prompt_alternatives_on
flag in the REPL.
- 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.
Solution
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).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow