假设我列出了事实:
letter(a).
letter(b).
letter(c).
...
letter(z).
vowel(a).
consonant(b).
consonant(c).
consonant(d).
vowel(e).
consonant(f).
...
consonant(z).
如果我按“字母”顺序声明规则,我会在控制台中收到以下警告:
Warning: /Users/…/prolog-example.pl:31:
Clauses of vowel/1 are not together in the source-file
Warning: /Users/…/prolog-example.pl:32:
Clauses of consonant/1 are not together in the source-file
Warning: /Users/…/prolog-example.pl:35:
Clauses of vowel/1 are not together in the source-file
Warning: /Users/…/prolog-example.pl:36:
Clauses of consonant/1 are not together in the source-file
Warning: /Users/…/prolog-example.pl:51:
Clauses of vowel/1 are not together in the source-file
但是,如果我执行以下操作:
letter(a).
letter(b).
letter(c).
...
letter(z).
consonant(b).
consonant(c).
consonant(d).
...
consonant(z).
vowel(a).
vowel(e).
vowel(i).
vowel(o).
vowel(u).
vowel(y).
我没有收到警告。这些警告只是warnings
错误还是实际错误?