[Info-vax] Removing blank lines from text files
Dave Froble
davef at tsoft-inc.com
Sat Jun 15 10:55:51 EDT 2019
On 6/15/2019 10:31 AM, Dave Froble wrote:
> On 6/14/2019 11:47 PM, Bob wrote:
>> Alas, that also finds lines with whitespace but no text.
>> My files include many of those.
>>
>
> The following simple (untested) program is most likely less typing than
> has already been spent on this subject.
>
> 10 Input "Input filename", F$
> Open F$ for Input as File 1%
>
> 20 Input "Output filename"; F2$
> Open F2$ for Output as File 2%
>
> On Error GoTo 90
>
> 30 Linput #1%, L$
> GoTo 30 If L$=""
> Print #2%, L$
> GoTo 30
>
> 90 Resume 99 If Erl=30 and Err=11
> On Error GoTo 0
>
> 99 End
>
Ok, tested, it doesn't handle tabs. Modify as:
30 Linput #1%, L$
L9$ = Edit$(L$,2%)
GoTo 30 If L9$=""
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list