【问题标题】:Turning off warnings in swi-prolog关闭 swi-prolog 中的警告
【发布时间】:2011-01-29 17:45:23
【问题描述】:

如何关闭 swi-prolog 中的警告。

Clauses of XXX/AA are not together in the source-file

很烦人。

【问题讨论】:

    标签: swi-prolog


    【解决方案1】:

    相反,您可以修复警告。

    当无法将静态(已编译)谓词的子句编译为单个单元时,需要 discontiguous directive。当子句定义为:

    • 不连续
    • 超过最大子句数

    【讨论】:

    • 当达到最大子句数时,在哪个系统中会发生这种情况?没听说过。
    • @false 我觉得这已经不是问题了,但至少在很久以前 SWI Prolog 就有这个问题了。
    • 这个问题仍然没有答案。是否可以关闭 SWI-Prolog 中的所有警告以便只显示错误?
    • @AndersonGreen 是的,带有 style_check
    【解决方案2】:

    您可以通过style_check 使用:-style_check(-discontiguous). 关闭这些警告。

    例如,您也可以使用:-style_check(-singleton). 推迟有关单例变量的警告

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-16
      • 2011-04-26
      • 2016-09-05
      • 1970-01-01
      相关资源
      最近更新 更多