%% /ofile public
// Create new file, or truncate an old file if it exists
open-file "testwrite" file-id nf new-truncate
// Write 25000 rows
start-loop repeat 25000 use i
(( line
@some text in line <<print-out i>>
)) notrim
string-length line to line_len
write-file file-id nf from line length line_len
end-loop
// Rewind back to the beginning
file-position set 0 file-id nf
// Read all 25000 rows back, and print them out
read-file file-id nf to whole_file
print-out whole_file
// Close the file
close-file file-id nf
%%
Copied!