users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to read a line of text?


From: Fergus Henderson
Subject: Re: How to read a line of text?
Date: Fri, 9 Jan 2004 14:22:08 +1100
User-agent: Mutt/1.4i

On 09-Jan-2004, Ron Stodden <address@hidden> wrote:
> Re 4 below, I have just discovered the neat (swi-prolog) ability to 
> specify a literal character code in the form 0\'z.

Huh?  What's with the backslash?
The ISO Prolog standard way of doing that is just "0'z",
with no backslash, e.g.

        p(0'z).

I just tried your suggested syntax in SWI-Prolog 5.0.8,
and it reported a syntax error, but it accepted the ISO Prolog
syntax just fine.

> Except in editing, where kwrite under Prolog 
> highlighting wrongly takes the ' as the start of a quote.

Use a better editor, or at least a better Prolog mode.  Any good editor
designed for editing Prolog code that supports syntax highlighting should
be able to properly tokenize Prolog.

> Unfortunately, I cannot locate any similar facility in GNU Prolog. 

GNU Prolog supports the ISO Prolog syntax just like SWI Prolog 5.0.8.

-- 
Fergus Henderson <address@hidden>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]