Re: [cc65] A bug? (was: Questions for CBM guys)

From: <silverdr1inet.com.pl>
Date: 2008-03-05 23:56:15
On 2008-03-05, at 18:43, Mark J. Reed wrote:

> The C spec requires that "\n", regardless of its in-memory
> representation,  maps on I/O to whatever the normal end-of-line
> convention is on the platform.  On the Commodore, at least, that's
> clearly a bare carriage return.  On the Atari, it should proably come
> out as chr$(155) (IIRC).
>
> The C spec further requires that "\n" and "\r" have different
> representations in memory, such that '\n' == '\r' is never true.
>
> However, it does not require '\r' to have any particular effect when
> output.  That's up to the output device.

If that is defined exactly as you write in the current C standard,  
then the question is of course invalid but it still surprises me. I  
haven't read any specs on C. I learned it many years ago from K&R. It  
was some time before C even get standardised but I must have learnt it  
from K&R how \r behaves and I know that I relied on this behaviour  
many times in the past and this was the first time I found it not  
working as expected.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Mar 5 23:56:30 2008

This archive was generated by hypermail 2.1.8 : 2008-03-05 23:56:34 CET