Re: CR/LF

new topic     » goto parent     » topic index » view thread      » older message » newer message

>I know that \r = carriage return = ASCII 13.  So if \n = newline != 13&10,
what is it's true value?


\n = ASCII 13
\r = ASCII 10

When reading in a file in text mode (i.e. normal mode, opened without a 'b'
in the mode sequece) then \r is removed when found after a \n automatically.
Simerlar \r is added, when you write a \n in text mode.

Why ? \r is DOS/IBM-Pc specific.

You could in theory write programs that will work under UNIX (when Euphoria
supports that.. or with.. Peu) with text files without any problem,
eventhough under UNIX text files are slightly different formatted.

An \n indicated jump to next line in Euphoria, however no action is
associated with \r, however its an common used 'end-of-line' terminator.

Ralf

PS Robert I assume new versions of Euphoria handle '0' better ? (maybe using
a new version of puts.. rather than building the whole text sequence, no
slow dynamic trick is needed when putsing everything one character at a
time, or better yet, blocks of 4)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu