3 ms·
They didn't, it's there from at least ANSI C89 (ISO C90): "A byte with all bits set to 0, called the null character, shall exist in the basic execution characte
by nuxi 16y ago
They didn't, it's there from at least ANSI C89 (ISO C90):
"A byte with all bits set to 0, called the null character, shall exist in the basic execution character set; it is used to terminate a character string literal."
- JoachimSchipper 16y agoI think the rationale is in EBCDIC support; the C standard didn't want to/couldn't mandate ASCII, and therefore could not use the ASCII NUL character. I honestly don't know whether POSIX/SUS mandates ASCII.
- nuxi 16y agoAs far as I understand, no: http://www.opengroup.org/onlinepubs/000095399/xrat/xbd_chap06.html http://www.opengroup.org/onlinepubs/000095399/xrat/xbd_chap0...
- JoachimSchipper 16y agoI read that as "ASCII must be supported, do whatever else you want". But I don't want to spend too much time on this...