Read a file line by line: Difference between revisions

Line 343:
2drop
repeat ;</lang>
 
== {{header|Icon}} and {{header|Unicon}} ==
Line oriented I/O is basic. This program reads lines from "input.txt" into the variable line, but does nothing with it.
 
<lang Icon>procedure main()
f := open("input.txt","r") | stop("cannot open file ",fn)
every line := read(f)
close(f)
end</lang>
 
=={{header|J}}==
Anonymous user