Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables print

Status
Not open for further replies.

PrologStudent1

Programmer
Joined
Oct 6, 2014
Messages
1
Hello everyone. I am currently coding a program that is supposed to get as input a clause, and write back ie the grammatical number or the time (past/future/present).

i.e. "The dog barks now." gives : Number: Singular, Time: Present.

the following is a part of my code, where it prints "Accepted" if the sentence given is syntactically correct.
Code:
check(Sentence) :-
  s(Sentence, []) -> write('Accepted\n')

s --> np(Number), vp(Number, Time).

What should I add in order to print as well Number and Time variables?

Thanks in advance!

 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top