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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to prolog - how to execute program??

Status
Not open for further replies.

yeeser

Programmer
Nov 2, 2003
1
0
0
US
Hi.

I have a prolog program which compiles fine. I'm using SWI-Prolog interface. I'm completely new to Prolog and am using it to break words into syllables.

I have code from here:
but I don't know how to query the program!!?? Please help. Thank you very much.
 
the unix(argv([Word|Constraints])), line makes it look like it's intended to run from the command prompt, instead of in the SWI-Prolog interface. If you replace that with getWord(Word), the program should prompt you for words instead. Then just start up SWI-Prolog, type in['filename.pl']. at the query prompt, press enter, then type doit. It should prompt you for the word, then break it down.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top