<div class="notebook"> <div class="nb-cell markdown" name="md1"> ## 09.01. Matching- und Vergleichsoperatoren </div> <div class="nb-cell markdown" name="md2"> Was antwortet Prolog auf die folgenden Anfragen? Überlege dir, wie die Rückgabe aussieht und überprüfe anschließend mit dem 'Run Query'-Button rechts, ob du recht hattest. </div> <div class="nb-cell query" name="q1"> food(a) == food(a). </div> <div class="nb-cell query" name="q2"> food(a) =:= food(a). </div> <div class="nb-cell query" name="q3"> 3+4*5 == +(3,*(4,5)). </div> <div class="nb-cell query" name="q4"> 3+4*5 == *(+(3,4),5). </div> <div class="nb-cell query" name="q5"> [ha,hu] == '[|]'(ha,'[|]'(hu,[])). </div> <div class="nb-cell query" name="q6"> [ha,hu,ho] == [ha,hu|[ho]]. </div> <div class="nb-cell query" name="q7"> [ha,X,ho] == [ha,hu|[ho]]. </div> <div class="nb-cell query" name="q8"> [ha,X,ho] = [ha,hu|[ho]]. </div> <div class="nb-cell query" name="q9"> (3<4) == <(3,4). </div> <div class="nb-cell query" name="q10"> 3+4*5 == X. </div> <div class="nb-cell query" name="q11"> 3+4*5 = X. </div> <div class="nb-cell query" name="q12"> 3+4*5 =:= X. </div> <div class="nb-cell query" name="q13"> 3+4*5 = X+Y. </div> <div class="nb-cell query" name="q14"> 3+4*5 = X*Y. </div> <div class="nb-cell query" name="q15"> 3+4*5 =:= 35. </div> <div class="nb-cell query" name="q16"> 3+4*5 =:= 23. </div> <div class="nb-cell query" name="q17"> 3+4*5 = 23. </div> <div class="nb-cell query" name="q18"> 6=X, X*5 =:= 30. </div> <div class="nb-cell query" name="q19"> 6=X, X == 6. </div> <div class="nb-cell query" name="q20"> 6=X, 7=X. </div> </div>