Using SWI-Prolog Interactively - Output Taken off

邮差的信 提交于 2019-11-27 19:38:26

问题


I'm using SWI-Prolog interactively. When I run my query, I get a prefix of the output and the rest is taken off (marked using the string ...|...). Is this normal or should I go back and fix my program?


回答1:


Nothing to worry about. It's just abbreviating it visually... just press 'w' (write) to display the complete internal representation of the list.




回答2:


The number of items shown is controlled by a prolog flag. You can remove it by issuing

remove_max_depth:-
    current_prolog_flag(toplevel_print_options,Options), 
    select(max_depth(_), Options, NOptions)->
    set_prolog_flag(toplevel_print_options, NOptions); true.


来源:https://stackoverflow.com/questions/10252431/using-swi-prolog-interactively-output-taken-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!