Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:course_rules [2019/06/27 15:50]
pl:prolog:pllib:course_rules [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Course rules ======
 +{{tag>​rules}}
 +===== Description =====
 +Course rules
 +
 +**Source**: ​ The Art of Prolog
 +===== Download =====
 +Program source code: {{course_rules.pl}}
 +===== Listing =====
 +<code prolog>
 + lecturer(Lecturer,​Course) :-
 + course(Course,​Time,​Lecturer,​Location).
 +
 + duration(Course,​Length) :-
 + course(Course,​time(Day,​Start,​Finish),​Lecturer,​Location),​
 + plus(Start,​Length,​Finish).
 +
 + teaches(Lecturer,​Day) :-
 + course(Course,​time(Day,​Start,​Finish),​Lecturer,​Location).
 +
 + occupied(Room,​Day,​Time) :-
 + course(Course,​time(Day,​Start,​Finish),​Lecturer,​Location),​
 + Start =< Time, Time =< Finish.
 +
 +% Program 2.4: Course rules
 +
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/course_rules.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0