Question

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.

Was it helpful?

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
scroll top