Reputation: 1347
I was wondering what this code does:
:- set_prolog_flag(toplevel_print_options,
[quoted(true), portray(true), attributes(portray), max_depth(100)]).
I have seen it in some of the sample codes my prof has posted on his website but I have no clue what it does. Thanks for your help in advance.
Upvotes: 1
Views: 186
Reputation: 7583
I believe it might have something to do with making program output more formatted (and thus, more readable or accessible.)
See this article: "Help... Prolog writes [x, y, z|...], I want the whole answer".
Basically, in the case of your code's settings... it looks like the code is just setting some formatting for output. The max_depth
setting means that anything that is nested more than (100, in your case,) levels will then be written as ...
. The rest of the options just enable normal output.
Upvotes: 2