1

I have to do a small program to work with sets like A = {3,5,1,8}. A set like this can be made by the facts:

set(a,3)
set(a,5) 
set(a,1) 
set(a,8)

and I've got these domains and this fact:

domains 
name=symbol
element=integer 

facts
set(name,element)

Now I have to implement a function that lets the user add new sets, but I have to use the predicate "readterm" to read the sets from the keyboard and I've got no idea how to use it :S

Can you help me?

Thanks!

m09
  • 7,490
  • 3
  • 31
  • 58
llKoull
  • 335
  • 3
  • 14

1 Answers1

0

Here's some documentation on readterm: http://www.aistudy.com/program/prolog/visual_prolog/Handling%20terms%20in%20text%20files.htm

Scott Hunter
  • 48,888
  • 12
  • 60
  • 101