21 lines
533 B
Plaintext
21 lines
533 B
Plaintext
call removeLines "foobar.txt", 1, 2
|
|
end
|
|
|
|
sub removeLines filename$, start, count
|
|
open filename$ for input as #in
|
|
open filename$ + ".tmp" for output as #out
|
|
lineCounter = 1
|
|
firstAfterIgnored = start + count
|
|
while not(eof(#in))
|
|
line input #in, s$
|
|
if lineCounter < start or lineCounter >= firstAfterIgnored then
|
|
print #out, s$
|
|
end if
|
|
lineCounter = lineCounter + 1
|
|
wend
|
|
close #in
|
|
close #out
|
|
'kill filename$
|
|
'name filename$ + ".tmp" as filename$
|
|
end sub
|