I'm trying to write to a txt file using prolog so I tried making a simple predicate to test that, here it is:
writefacts():-
open('output.txt', write, Out),
write(Out, 'test'),
close(Out).
The problem is that when I run it, on SWI-Prolog (AMD64, Multi-threaded, version 8.2.1), all I get is true and nothing on the output.txt.
I've already tried looking for similar questions, but all I learned is that this code should be working. Thanks for any help.