home *** CD-ROM | disk | FTP | other *** search
Prolog Source | 1986-10-07 | 795 b | 33 lines |
- /* Program 2 */
- /*
- Goals for this program are on page 21 of the
- manual. We have added an error to this
- program to show how errors are returned. To
- correct this program just delete the portion
- marked.
- */
-
- domains
- brand, color = symbol
- age, price = integer
- mileage = real
-
- predicates
- car(brand,mileage,age,color,price)
-
- /* <== delete from this line [F7] down to... */
- goal
- car(renault,13,3,red,12000).
-
- /* 2200 type error: at the bottom of
- the message window is this error. 3.5 is
- not an integer and Age must be an integer.
- Delete this goal section and continue to
- read page 21 */
- /* ... here ==> */
-
- clauses
- car(chrysler,130000,3,red,12000).
- car(ford,90000,4,gray,25000).
- car(datsun,8000,1,red,30000).
-