Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Reverse the order of lines in a text file while preserving the contents of each line (view source)
Revision as of 22:56, 28 November 2021
, 2 years agoReverse the order of lines in a text file while preserving the contents of each line en BASIC256
(Reverse the order of lines in a text file while preserving the contents of each line en FreeBASIC) |
(Reverse the order of lines in a text file while preserving the contents of each line en BASIC256) |
||
Line 117:
"Diplomacy is the art of
</pre>
=={{header|BASIC256}}==
{{trans|FreeBASIC}}
<lang BASIC256>source = freefile
open (source, "text.txt")
textEnt$ = ""
dim textSal$(size(source)*8)
linea = 0
while not eof(source)
textEnt$ = readline(source)
linea += 1
textSal$[linea] = textEnt$
end while
for n = size(source) to 1 step -1
print textSal$[n];
next n
close source
end</lang>
{{out}}
<pre>
Igual que la entrada de FreeBASIC.
</pre>
=={{header|Factor}}==
|