How do i read in char type by users if they are a- , b+ , o+ ? I don't seem to have problem reading in char like a , b , c or d. i am using read(X) . Can someone help me out with this ? Thanks in advance.
A:
As I remember read/1 reads the term. If you want to read characters you may consider get_char/1 or something like that
?- get_char(X),get_char(Y).
|: a-
X = a,
Y = (-).
ony
2010-03-22 05:08:50