Read entire file: Difference between revisions

Read entire file in various BASIC dialents
(Read entire file in various BASIC dialents)
Line 272:
130 close 4
140 end</lang>
 
==={{header|BASIC256}}===
<lang basic256>f = freefile
open f, "input.txt"
while not eof(f)
linea$ = readline(f)
print linea$
end while
close f</lang>
 
==={{header|True BASIC}}===
<lang qbasic>OPEN #2: NAME "input.txt", ORG TEXT, ACCESS INPUT, CREATE OLD
DO
LINE INPUT #2: linea$
PRINT linea$
LOOP UNTIL END #2
CLOSE #2
END</lang>
 
==={{header|Yabasic}}===
<lang yabasic>open "input.txt" for reading as #1
while not eof(1)
line input #1 linea$
print linea$
wend
close #1</lang>
Or also
<lang yabasic>a = open("input.txt")
while not eof(a)
line input #a linea$
print linea$
end while</lang>
 
=={{header|BBC BASIC}}==
2,122

edits