[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 12 02:25:51 2000 
Subject:Re: defining "|" as or in Poplog Prolog 
From:Martin Sondergaard 
Volume-ID:1000712.02 

> > ...
> > I'm not familiar with Poplog's implementation of Prolog, but in a
> > typical Prolog system, the following two lines should work.
> > ....
> >     :- op( 1100, xfy, | ) .
> >
> >     X | Y :- X ; Y .
>
> Thanks Alan.
> The required precedence in poplog prolog is 254.
>
> Unfortunately the compiler complains if it finds "|" in either of
> those two positions.
>

Just check whether your prolog compiler can accept
the "op" command if you put single quotes around the '|'.
This should turn it into an atom,
which may make the "op" command work.

    :- op( 1100, xfy, '|' ) .

    X | Y :- X ; Y .



--
    Martin Sondergaard,
    London.