Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!usc!ucsd!ogicse!decwrl!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.lang.c Subject: Re: strncpy Summary: fixed size character buffers are not arbitary length strings Message-ID: <11619@csli.Stanford.EDU> Date: 5 Jan 90 22:06:49 GMT References: <11527@csli.Stanford.EDU> <0000006@ki4pv.UUCP> Sender: poser@csli.Stanford.EDU (Bill Poser) Reply-To: poser@csli.stanford.edu (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 32 In response to my claim that: All other representations of arbitrary length strings require similar overhead, e.g. a character count in the descriptor. in article <0000006@ki4pv.UUCP> tanner@ki4pv.UUCP (Dr. T. Andrews) writes: >I beg to differ. By defining storage fields of a certain size, and >using strncpy() to manipulate them, "strings" of that size may be >handled without character counts in the descriptors. This is irrelevant. Fixed size strings are not arbitrary length strings Please read messages before responding to them. He continues: >That they don't teach people about character arrays of known size >at Stanford is purely a local teaching decision and therefore not >a suitable subject for outside debate. There is of course no basis for the inference that I do not know about fixed size strings. Dr. Andrews seems to know this, as he writes: at Stanford, where strncpy() and on [sic] buffers of known size are an important subject of research; we expect Mr. Poser's paper on the same shortly. In any case, I have no idea what is taught on this subject at Stanford, as I am neither a student nor a member of the Computer Science faculty. I first began to use C at Bell Labs.