disappearing spaces problem

From: Patrick Herring (ph_at_anweald.co.uk)
Date: 09/08/04


Date: Wed, 08 Sep 2004 12:20:47 GMT

Here's a problem I'm having in SWI but have also had with LPA (DOS)
and Sicstus and have never understood let alone solved:

If I do op( 0500, yfy, and).
then write( a and b )
gives a and b
but if I do op( 0500, yfy, & )
then write( a & b )
gives a&b
where the spaces either side of the & have gone. I also get this with
pseudo-random other user-defined ops.

I've always assumed it was down to operator precedence but the above
example shows that's not necessarily it. Any clues?

-- 
Patrick Herring, Sheffield, UK
http://www.anweald.co.uk


Relevant Pages

  • Re: Global predicates in SWI and Sicstus Prolog
    ... Checked it in SICStus and in SWI. ... You would have to put all global predicates in such a global module. ... The module qualification defaulting rules in MasterProlog are quite ...
    (comp.lang.prolog)
  • Re: Global predicates in SWI and Sicstus Prolog
    ... > so that terms read by read/2 are actually read with the intended module qualifiers? ... For SWI you've found out. ... Quintus/SICStus foreign stuff from SWI as well as an emulation ... layer to realise SWI-style foreign linking from SICStus. ...
    (comp.lang.prolog)
  • Re: Golf Problem
    ... Thank you very much for posting your code. ... labeling order (alas, SWI currently does not allow to specify options ... % reorder variables for labeling (ff in SICStus) ...
    (comp.lang.prolog)
  • Re: how to redefine call/2 ?
    ... SWI, GNU, SICStus and Yap. ...
    (comp.lang.prolog)