I have my program reading in data from a file but i want it to create a file if the given filename does not exist.
read(File),
open(File, read, S),
read(S, X),
close(S),
doStuff(X).
I have found that in the open line I should be able to have | open(File, readwrite, S),
but that doesn't work, so any other suggestions?
Thanks
read(File),
open(File, read, S),
read(S, X),
close(S),
doStuff(X).
I have found that in the open line I should be able to have | open(File, readwrite, S),
but that doesn't work, so any other suggestions?
Thanks