From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,2afd440a210c7fb0 X-Google-Attributes: gidf7344,public X-Google-Thread: 1014db,6bdc5c27a0dec527 X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public From: JF Mezei Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/09/08 Message-ID: <35F4C2DC.6FAC399F@videotron.ca>#1/1 X-Deja-AN: 388929995 Content-Transfer-Encoding: 7bit References: <0095000017115526000002L062*@MHS> <6svdad$ggd@web.nmti.com> <6t18af$p83$1@Starbase.NeoSoft.COM> <6t1i0l$241@web.nmti.com> <6t24vj$kep$1@Starbase.NeoSoft.COM> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@videotron.net X-Trace: weber.videotron.net 905232595 207.96.232.162 (Tue, 08 Sep 1998 01:29:55 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Tue, 08 Sep 1998 01:29:55 EDT Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c Jordan Henderson wrote: > If nul-terminated string *constants* are a "feature" of the language, then > so are nul-terminated strings. Denying this is like saying that > ints aren't a part of the language, just int constants. After all, what > you _do_ with an int variable is outside of the definition of the language. I do not know what the current C standard calls a "string", but in the older version of C, "strings" were arrays of single characters. Character constants are not really an array of characters but rather a pointer to a null terminated string stored somwehere in the galaxy. The "sizeof" on a character array yields allocated space, not the string's length. char is a data type. string isn't. You can't redefine the way the C compiler generates string constants, but what you do with a string array is up to you. The big question is whether you compiler's implementation allows you to redefine string handling functions and use your own. If so, then you can redefine the way a string is stored, and write your own string functions/macros (such as strlen) that act on your own way of storing strings. (As long as you don't use constants). But should ask: why not name your own copy of sting functions differently instead of working against the C supplied routines ?