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: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public From: geest3+@pitt.edu (Gregg E Economou) Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/08/27 Message-ID: <6s3t9l$9ua$1@usenet01.srv.cis.pitt.edu>#1/1 X-Deja-AN: 385301853 References: <0095000017115526000002L062*@MHS> <35E17279.236FC9E2@ubs.com> <6rukse$3q0$1@usenet01.srv.cis.pitt.edu> <35E3FB05.1B94F00E@ubs.com> Organization: University of Pittsburgh Newsgroups: comp.os.vms,comp.sys.dec But it is a convention, yes convention since the beginning, yes the string handling libraries all assume a null-terminated string, but you could just as easily use some other means of representing ASCII text. Just about the only real assumptions about the machine that C has a hard time living without is the existence od an 8-bit byte and a byte-addressable memory system. And even those you can work around. K&R did set the convention on null-terminated strings, and it is rational enough, and very flexible, as something which illustrates a higher-level construct existing in the onctext of C wihtout being a part of the actual language. Certainly there are times when null-termination on strings can be a pain, and at those times some small management and explicitly sized buffers can be maintained to keep track of it, or whatever. you're not _bound_ to null-terminated text in C! happy hacking, gregg In article <35E3FB05.1B94F00E@ubs.com>, Paul Sture wrote: > >I have to disagree, as I distictly remember reading all about it in Kernighan and >Ritchie's book on C.