terpri (file?)
A file pointer to a previously opened file. This may be either a file in the file system, or a string opened for read and write.
This function writes a newline to the open file. Any existing contents written to a file before it was opened will be deleted when the file is opened and written to.
This example writes a file with the following contents, including the newline:
(chars (1 2 3))
(chars (4 5 6))Gamma> fw = open("mytpfile.dat", "w");
#<File:"mytpfile.dat">
Gamma> write(fw,list(#chars,list(1,2,3)));
t
Gamma> terpri(fw);
t
Gamma> write(fw,list(#chars,list(4,5,6)));
t
Gamma> close(fw);
t
Gamma> fr = open("mytpfile.dat", "r", nil);
#<File:"mytpfile.dat">
Gamma> read_line(fr);
"(chars (1 2 3))"
Gamma> read_line(fr);
"(chars (4 5 6))"
Gamma> terpri();
t
Gamma>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.