1. Re: 102bakslashin --read as
- Posted by Lucius Hilley III <lhilley at CDC.NET>
Nov 18, 1998
-
Last edited Nov 19, 1998
CR = 13--character 13 Carriage Return
LF = 10--character 10 Line Feed
What I am saying is that when Euphoria reads a line of text from a file
in non-binary format it throws away the CR of a CR LF pair.
AND when Euphoria writes a line of text to a file in a non-binary
format it automatically includes CR of the CR LF pair unless the
CR is already there. HENCE, open() added the CR's Not puts().
open() both strips during input and adds them during output.
Maybe that is as clear as mud.
_________________________
Lucius L. Hilley III lhilley at cdc.net
http://www.cdc.net/~lhilley
http://www.americanantiques.com
http://www.dragonvet.com
_________________________
On Wed, 18 Nov 1998 08:44:08 PST, Lewis Townsend <keroltarr at HOTMAIL.COM>
wrote:
>Hello,
>
>>You probably opened the file and saved the file in the following
>>manner.
><snip>
>
>I'm not sure I follow. Are you saying that the "puts()" routine
>automatically changed all the 10s to 13s (or whatever '\n' is)? So I
>didn't need this part of code:
>
>for i = 1 to length (text) do
> if text [i] = 10 then
> text [i] = '\n'
> end if
>end for
>
>because I DID use "puts ()" to write back to the file.
>
>>I hope this clears things up a bit.
>
>Thanks
>
<SNIP> of code.
>
>Sincerely,
>Lewis Townsend
>|\ F""\ | | /""\
>| \ |_ \ |\ | | \__
>| \ | \ | \ | | \
>| \L___ \| \| | \__/
>| |\ \
>| | \ \ |""\ T==TT==7
>| | \ \ | | ||
>| |___\ \ |__/ ||
>| \ | \ ||
>|_________\| \ ||
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com