For review: Improve debugging printout under Prolog

Lee Naish lee at cs.mu.oz.au
Wed Oct 29 12:11:10 AEDT 1997


In article <199710280715.SAA08238 at mundook.cs.mu.OZ.AU>, Peter Schachte <pets at cs.mu.oz.au> writes:

> +% Note that you need to compile it to a .no file - loading it as a .np file

.np should be .nl

> +prefix_op(Op, NeededPrecedence, ArgPrecedence) :-
> +	(   current_op(NeededPrecedence, fx, Op) ->
> +		ArgPrecedence is NeededPrecedence - 1
> +	;   current_op(NeededPrecedence, fy, Op) ->
> +		ArgPrecedence = NeededPrecedence
> +	).

-> without ; is non-standard in NU-Prolog, succeeding if the condition fails.
For portability, every -> should have a ;.  ~lee/src/lib/chkarrow.nl can be
used to check for this (nit should really check it also).

	lee



More information about the developers mailing list