Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!unmvax!deimos.cis.ksu.edu!uxc!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: strings Message-ID: <6200004@ux1.cso.uiuc.edu> Date: 18 May 89 15:42:00 GMT References: <10245@socslgw.csl.sony.JUNET> Lines: 16 Nf-ID: #R:socslgw.csl.sony.JUNET:10245:ux1.cso.uiuc.edu:6200004:000:773 Nf-From: ux1.cso.uiuc.edu!phil May 18 10:42:00 1989 > The major problem with using anything other than \0-terminated > strings in C is that you give up the easy ability to define > string constants a la "/etc/passwd". Standard C compilers will > create a \0-terminated string for these, regardless of what > your home-made string utilities prefer. If you wanted to redefine how strings worked as a part of the language or as a special implementation, then the constants would of course be defined that same way. "/etc/passwd" is, of course, NOT a string, but a constant address of array of char. That is part of the origins of C. A language extension could create a string primitive type, and the compiler would have to build "/etc/passwd" as (string) or as (char *) as appropriate to the type of usage. --phil howard--