[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with replacing LFs with CRs for //e



I wrote:

>Mike Pfaiffer wrote:
>
>>        Simple Applesoft program. I presume you can write the program on
>your
>>own
>>if I give you directions.
>>
>>1)      Take care of opening the input file and an output file.
>>2)      Read in a single character from the input file
>>3a)     If there is an error then close both files (end of file) and go to
>>step 5
>>3b)     Compare the input character to chr$(10) - if it is then send
>chr$(13)
>>to the output file
>>3c)     If the input character isn't chr$(10) then send it to the output
>file
>>4)      Start over with step 2
>>5)      Do what you want with the two files
>>
>>
>>        This program is very slow. There is a ProDOS call which allows the
>>end of
>>line character to be changed. You may consider using this to change it to
>>chr$(10) and performing an input rather than a get. Then use a print with
>>a ";" (no end of line) then manually insert the chr$(13) with a ";". This
>>should be faster.
>
>Or just write the line with a print with no ";"--that will write the line
>with
>an appended CR ($13).
>
>I didn't realize that ProDOS supported changing the "end-of-record"
>delimiter.  Interesting.

Ha!  (Hitting self on forehead...  ;-)

Just as I clicked "send", I realized that the "write" delimiter was
the same as the "read" delimiter.  Never mind.  ;-(

-michael

Check out amazing quality sound for 8-bit Apples on my
Home page:  http://members.aol.com/MJMahon/