[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ed] ed EOF behavior
From: |
Andrew Moore |
Subject: |
Re: [Bug-ed] ed EOF behavior |
Date: |
Thu, 31 Jan 2013 02:15:11 -0800 |
Eschew obfuscation...
*ip++ = 0;
*cp++ = '\0';
On 30 Jan 2013, at 8:52 AM, Antonio Diaz Diaz <address@hidden> wrote:
>> Finally, equating the null character '\0' with (int) 0 is asking for
>> trouble...
>
> Why?
>
> The C standard states clearly that:
> 1) An integer character constant has type int.
> 2) The value of the escape sequence '\0' is 0.
>
> So they are equivalent.
>
>
> Regards,
> Antonio.