prolog icon indicating copy to clipboard operation
prolog copied to clipboard

multiline block comment not accepted by consult/1 predicate

Open Jean-Luc-Picard-2021 opened this issue 6 months ago • 1 comments

If I use this Prolog text:

human(socrates).       % This is a fact.
mortal(X) :- human(X). % This is a rule.

Everything works fine:

?- human(X).
X = socrates;

On the other hand this Prolog text:

/**
 * block comment
 * block comment
 * block comment
 * block comment
 * block comment
 * block comment
 **/

human(socrates).       % This is a fact.
mortal(X) :- human(X). % This is a rule.

Doesn't work ok:

?- human(X).
2024/08/10 21:29:19 error(existence_error(procedure,human/1),root)

I used top level ['categories.p'] respectively ['categories2.p'] with these texts:

categories.p.log categories2.p.log

Jean-Luc-Picard-2021 avatar Aug 10 '24 19:08 Jean-Luc-Picard-2021