Re: redundancy



On Oct 22, 11:40 pm, Chip Eastham <hardm...@xxxxxxxxx> wrote:
On Oct 22, 2:53 pm, bart demoen <b...@xxxxxxxxxxxxxx> wrote:

On Mon, 22 Oct 2007 11:19:35 -0700, sbaker8688 wrote:
That would bring down the count to 4, rather
than 8, e.g. by replacing X<>Y with X < Y.

How does this work, Chip? Doesn't work on SWI. Is it a Visual Prolog
thing?

<> would be \== in SWI
< would be @< in SWI

Cheers

Bart Demoen

Yes, it would be @< (standard sort order) in reasonably
compliant Prolog implementations. I don't have Visual
Prolog 5.2 handy to test with, and my recollection may be
faulty. But with the strong typing of Turbo/PDC/Visual
Prolog, perhaps the relational operator < was used for
comparisons in all the primitive datatypes (or domains
in the PDC parlance). I don't remember @< being used
at all in the Turbo Prolog implementation.

regards, chip

I checked the current version of Visual Prolog (7.1),
and while the compiler complained about many obscure
things (related to getting the declarations right),
I fixed those, and there was never a complaint about
using < to compare two symbols (which is the PDC
equivalent for atoms, ie. strings stored in the
form of a reference to table values). So most
likely this would have worked in 5.2 as well.

--c


.



Relevant Pages

  • Re: SWI-Prolog best choice for GPL-licensed Windows-compatible processor?
    ... Even though I read about Prolog a long time ... Try Visual Prolog example of the Sudoku puzzles. ... You are welcome to read a detailed description of Visual Prolog Sudoku ... The description shows how such problem can be solved using constraint ...
    (comp.lang.prolog)
  • Re: Visual Prolog - opinions?
    ... I'm just getting going with Prolog again, ... Visual Prolog to be extremely frustrating. ... The "strange syntactic rules" in fact make a lot ... One of the stranger concepts was that of declaring ...
    (comp.lang.prolog)
  • Re: The identifier X must start with a lowercase letter - Visual Prolog
    ... Visual Prolog 7.3. ... will prevent program from displaying that X is a sibling of X? ... mother/2 (predicates require declarations in Visual Prolog). ... Please note that Visual Prolog is an interesting product, ...
    (comp.lang.prolog)
  • Re: Visual Prolog - opinions?
    ... I'm just getting going with Prolog again, ... Visual Prolog to be extremely frustrating. ... The "strange syntactic rules" in fact make a lot ... While there's nothing wrong with supporting gui programming, ...
    (comp.lang.prolog)
  • Re: Business Rules in Prolog
    ... might be like to develop your application in Visual Prolog, ... If you want to use Prolog, ... Prolog a Prolog system is about the same as naming a pascal compiler ... proprietary logic programming language. ...
    (comp.lang.prolog)