Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.2.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- consult(test).
ERROR: source_sink `test' does not exist
2 ?-
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- file:///Applications/test.txt
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- file:///Applications/test.txt.
ERROR: Syntax error: Operator expected
ERROR: fil
ERROR: ** here **
ERROR: e:///Applications/test.txt .
1 ?- ['Applications/test.txt'].
true.
2 ?- loves(X, Y).
X = tony,
Y = jennifer.
3 ?-
If this is correct, I think I may be ok from now on.
Thanks.
1 ?- ['Applications/nr2014.txt'].
ERROR: /Applications/nr2014.txt:89:1: Syntax error: Unexpected end of clause
true.
There can't be a syntax error because the program compiles perfectly well in the Windows XP version of SWI-Prolog. In any event, what do the numbers 89:1 refer to?
2 ?- go.
ERROR: open/3: No permission to open source_sink `nr_hfdata' (Permission denied)
3 ?-
The program tries to open a file called 'nr_hfdata' and write to it. This works perfectly well in the XP version, but it looks as if the I/O calls in Mac OS X work very differently.
The code that causes this error message looks like this:
calc_odds(_, [], []):-
open(nr_hfdata, append, Out),
set_output(Out),
nl,
close(Out),
open(spread_data, append, Spread_output),
set_output(Spread_output),
nl,
close(Spread_output).
Any ideas anyone?
Thanks,
Tony