home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
prolog
/
library
/
prolo_c
/
exampl02.pro
< prev
next >
Wrap
Text File
|
1986-10-06
|
795b
|
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).