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

Can't run the simplest of programs. HELP

Status
Not open for further replies.

Samohtvii

Programmer
Aug 2, 2012
21
AU
I am simply trying to set-up my prolog environment and ii have a simply program.
write(a).
that's it...
It always tells me "No permission to modify static procedure `write/1'"
Also does the same for read. As i have never used prolog is it something wrong with how i have set it up or do i need something else to my code.

Thanks
 
You can't write write(a). in a Prolog program, you can type that in a Prolog console.
A Prolog program is made of facts and rules. When you write simply b] write(a).[/b] in a Prolog program, Prolog "thinks" that you assert a new fact write(a) so it doesn't want it.
You can write a rule
Code:
t :- write(a).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top