You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dili Shesh, SWI-Prolog
neither of these lines is reasonable Prolog. In the first,
what_age(Other):-Other -5,format('~w Go to the college',[Grade])
you need a period at the end, and Grade is a 'singleton' - a variable that appears only once in a clause. Variables need to relate things to each other, so only using Grade once isn't useful.
The second line corrects this. Now Grade is Other -5
This line, however, lacks a period at the end.
I suspect you're typing these in at the top level. They go in a file. See: