[newbie] Usefulness of cut (!) ? As opposed to "fail" ?
From: Dirk Mittler (mdirk_at_sympatico.ca)
Date: 05/09/04
- Previous message: bart demoen: "Re: output **no What's wrong here?"
- Next in thread: Martin Sondergaard: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Reply: Martin Sondergaard: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Reply: Christopher Browne: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 8 May 2004 19:03:56 -0400
I'm using SWI-Prolog, and learning as I go. I haven't bought a book about
Prolog yet, but intend to. Meanwhile, I'm absorbing as much as I can from
the manual, and from general reading. And from experimenting all day.
One question I have in mind, and maybe somebody can explain this to me, is
why in a list of conditions, it's useful to have a cut operator (!) . One
situation would be, to avoid dangling pointers. Another situation could be,
if it was followed by a semicolon (or). But under what circumstances would
code want to issue a cut (!), not followed by a "fail", and not followed by
a ";" ?
Dirk
- Previous message: bart demoen: "Re: output **no What's wrong here?"
- Next in thread: Martin Sondergaard: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Reply: Martin Sondergaard: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Reply: Christopher Browne: "Re: [newbie] Usefulness of cut (!) ? As opposed to "fail" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]