Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. (defrule init
  2. (initial-fact)
  3. =>
  4. (printout t "Car starts? (yes/no)" crlf)
  5. (bind ?answer (read))
  6. (assert (car-starts ?answer))
  7. )
  8.  
  9. (defrule car-starts-yes
  10. (car-starts yes)
  11. =>
  12. (printout t "Sorry only do non-starting." crlf)
  13. )
  14.  
  15. (defrule car-starts-no
  16. (car-starts no)
  17. =>
  18. (printout t "Starter motor turns? (yes/no)" crlf)
  19. (bind ?answer (read))
  20. (assert (starter-motor ?answer))
  21. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement