Quick Question, Please Help!

36 views
Skip to first unread message

Parker Herold

unread,
Oct 4, 2017, 12:40:03 PM10/4/17
to SWI-Prolog
I am trying to print out more than the 10 layers set by the answer_write_options by using below:

set_prolog_flag(answer_write_options,
                   [ quoted(true),
                     portray(true),
                     spacing(next_argument)
                   ]).

However, I am trying to do this at runtime and continuously get:

ERROR: d:/swipl/workspace/zurg.pl:18:
        No permission to modify static procedure `set_prolog_flag/2'

I tried dynamic set_prolog_flag/2. to no avail. I would really like this to be ran at runtime so that when it prints out the answer for my teacher it doesn't print out the ... but the whole answer without him taking the extra step of setting the flag beforehand. Any help/advice/answers would be greatly appreciated!

Thanks in advance!

Kuniaki Mukai

unread,
Oct 4, 2017, 12:44:29 PM10/4/17
to Parker Herold, SWI-Prolog

> On Oct 5, 2017, at 1:40, Parker Herold <pcher...@gmail.com> wrote:
>
> I am trying to print out more than the 10 layers set by the answer_write_options by using below:
>
> set_prolog_flag(answer_write_options,
> [ quoted(true),
> portray(true),
> spacing(next_argument)
> ]).
>

How about to insert colon minus before the set_prolog_flag.


:- set_prolog_flag(answer_write_options,
[ quoted(true),
portray(true),
spacing(next_argument)
]).

Good luck.


> However, I am trying to do this at runtime and continuously get:
>
> ERROR: d:/swipl/workspace/zurg.pl:18:
> No permission to modify static procedure `set_prolog_flag/2'
>
> I tried dynamic set_prolog_flag/2. to no avail. I would really like this to be ran at runtime so that when it prints out the answer for my teacher it doesn't print out the ... but the whole answer without him taking the extra step of setting the flag beforehand. Any help/advice/answers would be greatly appreciated!
>
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
> Visit this group at https://groups.google.com/group/swi-prolog.
> For more options, visit https://groups.google.com/d/optout.

Parker Herold

unread,
Oct 5, 2017, 2:15:04 PM10/5/17
to SWI-Prolog
That did it, thanks! Can't believe I didn't try that!
Reply all
Reply to author
Forward
0 new messages