Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.

Adler07

Trainee

  • "Adler07" is male
  • "Adler07" started this thread

Posts: 54

Date of registration: Feb 25th 2007

Occupation: Informatik

1

Wednesday, July 9th 2008, 7:42pm

Problem zum cut-Prädikat von Programmiersprachen und Übersetzer??

Hallo,

Kann jemand mir noch erzählen,was genau cut-Prädikat "!" beschreibt,und wie das funktioniert..Definition hab ich ja mal gelesen,aber nicht wirklich verstanden..

Wenn der Fall auftrtt,z.b: p(d):- w(d,f),!,wd(d).
p(d):- h(d,m).

wenn 1.w(d,f) erfülltist,wenn dann wd(d) nicht erfüllt, --> fail.

2. w(d,f) erfüllt ist ,aber wd(d) auch erfüllt..was sollte man dann weiter machen?

3,wenn w(d,f) überhaupt nicht erfüllt ,dann --> fail oder??

Danke im Voraus!

MFG

retr0virus

Trainee

  • "retr0virus" is male

Posts: 83

Date of registration: Oct 2nd 2006

Location: NRW -> Bad Oeynhausen

Occupation: B.Sc. Informatik, 8.Semester

2

Wednesday, July 9th 2008, 8:38pm

Im Prinzip ist es genau so wie du es geschrieben hast.
Egal ob nach dem ! ein erfolgreicher oder ein fehlgeschlagener Aufruf gewesen ist,
man kann nur nach dem ! redos ausführen. Sobald man einen Wert vor dem redo
ändern wollte, würde das Programm beendet.
Wenn das Programm garnicht erst soweit kommt, ist es wie bei Programmen ohne ! auch,
nicht erfüllbar. Also fail/no/false wie auch immer ;)
Ein Nichts im Nichts und ins Nichts vertrieben!
- Ren Dhark

Adler07

Trainee

  • "Adler07" is male
  • "Adler07" started this thread

Posts: 54

Date of registration: Feb 25th 2007

Occupation: Informatik

3

Wednesday, July 9th 2008, 10:05pm

Hi,Danke für deine Tipps,aber hab noch nicht ganz verstanden,kannst du mal ein Beispiel geben?

MFG