On Wed, 30 Aug 2000, you wrote:

> Maarten ter Huurne wrote:
> > I don't know of any standard that uses <CR> as a line break. MS uses
> > <CRLF>, Unix uses <LF>.
>
> Doesn't Mac use <CR>?

According to David it does. I didn't know, I never used a Mac.

Why couldn't they standardise a simple thing like plain text?! :(

> > Maybe your modem accepts <CR>, but I don't think that's true for all
> > modems. Choosing <CRLF> is probably a safer bet.
>
> But if the modem listens to <CR>, then <CRLF> would
> in fact have some effect like this:
>
> ATZ<CR>
> <LF>ATZ<CR>
> <LF>
>
> The second ATZ (or any command) would be ignored
> because the modem doesn't understand the <LF>
> before it. Or am I mistaken? <:)

I think a well designed modem that needs <CR> would ignore the <LF>. Vice 
versa, a modem that needs <LF> should ignore <CR>.

> > LINE INPUT only works if the modem is sending <CRLF>. My modem sends <LF>
> > and therefore LINE INPUT will return with a buffer overflow error (end of
> > line not detected, so it will keep reading).
>
> If it needs to be read byte by byte, then would
> it be necessary to write to it byte by byte?

At low level, all RS232 I/O is byte by byte. The problem of LINE INPUT is not 
that it reads multiple characters, the problem is that it only accepts <CRLF> 
as a newline (LINE INPUT is "read until newline").

Bye,
                Maarten


****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****

Reply via email to