NULL as a string terminator

Chip Salzenberg chip at tct.uucp
Tue Aug 21 03:10:59 AEST 1990


According to cbp at icc.com (Chris Preston):
>In article <134 at blekko.UUCP> skrenta at blekko.UUCP (Rich Skrenta) writes:
>>*You* like your non-standard name for '\0', but no one else will
>>know what it means, and it's unlikely that it will ever be a Big Win
>>for you (like if we start terminating strings with ^A or something).
>
>Then, it will be a very big win.

Yes, but it will never happen.  I'm sure that Rich just forgot the
smiley.

Remember that '\0'-terminated strings are a part of the C language.
Get rid of them, and you don't have C any more.

It is obvious that most magic numbers should be removed to macro
definitions.  However, '\0' isn't one of them; it will NEVER change.
Not as long as you're programming in C, anyway...
-- 
Chip Salzenberg at Teltronics/TCT     <chip at tct.uucp>, <uunet!pdn!tct!chip>



More information about the Comp.lang.c mailing list