13 lines
252 B
Text
13 lines
252 B
Text
/# Rosetta Code problem: http://rosettacode.org/wiki/File_input/output
|
|
by Galileo, 10/2022 #/
|
|
|
|
def eof? dup -1 != enddef
|
|
|
|
"input.txt" "r" fopen
|
|
"output.txt" "w" fopen
|
|
over fgets
|
|
eof? while
|
|
over fputs
|
|
over fgets
|
|
eof? endwhile
|
|
drop fclose fclose
|