RosettaCodeData/Task/Input-loop/Phixmonti/input-loop.phixmonti

20 lines
360 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
/# Rosetta Code problem: http://rosettacode.org/wiki/Input_loop
by Galileo, 10/2022 #/
include ..\Utilitys.pmt
def eof? dup -1 == enddef
"input.txt" "r" fopen
( inf 0 -1 ) for drop
dup fgets eof? if drop exitfor else print endif
endfor
fclose
"input.txt" "r" fopen
eof? not while
dup fgets eof? if drop false else print true endif
endwhile
fclose