[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line endings in Lout
From: |
Robert A Duff |
Subject: |
Re: line endings in Lout |
Date: |
Tue, 5 Nov 2002 02:30:25 +0300 (MSK) |
> can
> end in CR, LF, CR+LF, or LF+CR.
You've got the right approach, I think. This is what I've done in
writing compilers. I understand you to mean: Read all text input files
in binary mode, on both DOS/Windows and Unix. Make sure the lexer can
deal with all of the above line-ending notations. Then you can count
characters in the input without getting confused. And users can copy
files between Unix and DOS/Windows without causing trouble.
Write text output files in text mode, so they "fit in" with that OS.
> Since I've never used a DOS system in my life,
Lucky you. ;-)
>...and have
> no way to test stuff on DOS, I would be very grateful
> if DOS-savvy people could comment on the feasibility
> and desirability of this proposal.
Yes, it is feasible and desirable.
- Bob
P.S. I don't know of any OS that uses LF+CR. Unix uses LF, Macs use CR,
and DOS/Windows uses CR+LF (although more and more Windows programs are
able to deal with plain LF, as well, these days).