Re: Patch to fix the DATA bug




On Sat, Apr 08, 2000 at 07:54:38PM +0200, Pawel Salek wrote:
> On  7 Apr, Anthony DeRobertis wrote:
> > Curious: Why did my:
> > 
> > 	message[left] = 0;
> > get into CVS as
> > 	message[left] = '\0';
> 
> IMO, the original expression includes a implicit data conversion from
> int to char. I guess it doesn't matter in general which way you write
> it, it just helps you to remember that message isn't an array of
> integers.

Nah, the numbers 0-255 (or -128 to 127) are valid character constants,
not just integer constants.

Jules

-- 
Jules Bean                          |        Any sufficiently advanced 
jules@{debian.org,jellybean.co.uk}  |  technology is indistinguishable
jmlb2@hermes.cam.ac.uk              |               from a perl script



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