For Programmers: Free Programming Magazines  


Home > Archive > Prolog > August 2005 > Re: Operator ambiguity - was LPTP - was Prolog compiler for Windows XP.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Operator ambiguity - was LPTP - was Prolog compiler for Windows XP.
Jan Wielemaker

2005-08-10, 9:04 am

On 2005-08-09, Jens Kilian <jjk@acm.org> wrote:
> Jan Wielemaker <jan@nospam.ct.xs4all.nl> writes:
>
> IIRC, there's a rule about atoms which are arguments of operators,
> which would disallow the infix case here.
>
> [time passes]
>
> Ah yes, it should be (I only have an old draft standard) this one:
>
> 6.3.1.3 Atoms
>
> [...] An atom which is an operator shall not be the immediate operand
> of an operator. [...]


Curious sentence. So

:- op(20, fx, aap).

?- display(- aap).
-(aap)

is actually not allowed by the standard? SWI and SICStus allow for it
(and most likely most Prologs).

Cheers --- Jan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com