1. Re: 102bakslashin --read as
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Nov 18, 1998
- 519 views
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 Here's my code if anyone cares: include file.e constant file = "jk200.e" object fn, line, text fn = open (file, "r") text = "" while 1 do line = gets (fn) if compare (line, -1) != 0 then puts (1, line) text = text & line else exit end if end while close (fn) fn = open (file, "w") for i = 1 to length (text) do if text [i] = 10 then text [i] = '\n' end if end for puts (fn, text) close (fn) ? '\n' Sincerely, Lewis Townsend |\ F""\ | | /""\ | \ |_ \ |\ | | \__ | \ | \ | \ | | \ | \L___ \| \| | \__/ | |\ \ | | \ \ |""\ T==TT==7 | | \ \ | | || | |___\ \ |__/ || | \ | \ || |_________\| \ || ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com