[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
PrologOpenwrite
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
PrologOpenwrite
(Prolog) openwrite
A common File I/O command to open a file to write to. If the file already exists, it is cleared first. If you want to keep the file intact and only add data to it, use openappend.
% Visual Prolog 5.2
DOMAINS
FILE = myFile
GOAL
openwrite(myFile,"d:\PrologTest.txt"),
writedevice(myFile),
write("My first Prolog file output!\n"),
writedevice(myFile),
closefile(myFile).
Code links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
