[Gambas-user] Help with some parsing

Benoît Minisini gambas at ...1...
Wed Feb 18 14:15:28 CET 2009


> nando ha scritto:
> > I got a chuckle from this one.
> > A typewriter, those mechanical things that are only in black and white
> > movies and museum actually performed CRLF using that bar to perform the
> > line feed and carriage return.  And CR LF comes from that.
> > All the software I write for HTTP, ascii files, When reading, I only look
> > for the LF. If I find a CR, I just ignore it. I have yet to find a case
> > it normally doesn't work with.
>
> I agree partially with you - I don't like the CR-LF convention: I think
> that a single LF is enough.
> But your programs, even if they ignore LF when reading, still use CR-LF
> when writing (I hope!), otherwise they did not respect the standard.
>
> And about the standard... someone in the past said a single LF would be
> the line terminator. But someone else thought that CR was enough (Apple
> computers for example, and before, other mainframes like VAX). Then,
> still someone else thought that neither was good, and used CRLF. If the
> american DoD, from which our Internet comes, decided CR-LF was the way
> to go, they too had good reasons, I think, even if I don't know them. I
> admire so much who invented IP, TCP/IP, FTP, HTTP, that I take for good
> what they said: CR-LF is the right line terminator even if I don't like it.
>

Maybe this is the reason why they decided to use CR-LF. This way, lines can be 
easily interpreted on Unix, Windows, and MacOS. Choosing just CR or just LF 
whould have done things more difficult for the two other OS.

Just my 2 cents.

-- 
Benoît




More information about the User mailing list