You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples:
?- portray_clause(((+) :- a=b,(-))).
(+) :-
a=b,
(-).
true.
?- portray_clause((a :- (b :- c))).
a :-
(b:-c).
true.
This addresses mthom#2715.
Currently, more round brackets than needed are emitted. Ideally, a
better approach to solve the issue here and also in toplevel.pl is
found in the future.
?- portray_clause(//).
outputs("(//).\n"), unexpected.
outputs("// .\n"). % expected, but not found
Justification: "//" is an atom which is an operator and thus has priority 1201 (6.3.1.3). The whole text is a valid clause term (6.2.1.2) because the priority for a clause term is 1201, too. As of today, only GNU Prolog writes this correctly, SICStus uses round brackets. And ignoring those that do not write round brackets for (//):-(//) or just write invalid syntax.
Example:
The text was updated successfully, but these errors were encountered: