home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
aijournl
/
1986_09
/
aiapp1.ltg
next >
Wrap
Text File
|
1986-10-30
|
419b
|
18 lines
Listing 1
A procedure to solve queries
PROCEDURE solve(query) ;
VAR
i : integer ;
BEGIN
IF query = NIL
THEN write('yes')
ELSE
FOR i := 1 TO max_rule_number DO
IF head(rule[i]) = head(query)
THEN solve( append( tail(rule[i]),tail(query) ) ) ;
END ; (* solve *)