Re: C Strings
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Tue, 06 Mar 2007 12:51:24 -0800
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> writes:
"Richard Bos" <rlb@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> wrote:
"Keith Thompson" <kst-u@xxxxxxx> wrote in message
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> writes:^^^^^^^^^
"cman" <tilakb@xxxxxxxxx> wrote in message
Can you "walk across" C strings or char pointers (using *(sz+1)) likeThere is essentially no such thing as a C string.
you can with arrays. If not, why not? If so, how?
What is so interesting about "ially no "[1], and how does it contradict
Keith's _completely true_ objection:
You are very naive about natural language.
How so? I'd really like to know what you meant when you wrote that
"There is essentially no such thing as a C string". As I've already
written in this thread, C99 7.1.1p1 clearly defines the term "string":
A _string_ is a contiguous sequence of characters terminated by
and including the first null character.
C uses the term "string" differently than some other languages do, but
I don't see how that affects the discussion. C has strings. Many,
perhaps most, C programs have many strings that exist at execution
time.
There essentially *is* such a thing as a C string. I can think of no
interpretation of your statement that is anything other than just
plain factually incorrect; the presence of the word "essentially" (I
think that's what you meant to emphasize) doesn't change that.
Perhaps I'm missing something. I invite you to explain what your
statement meant, and how it can be interpreted, even figuratively, as
a correct statement.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- Follow-Ups:
- Re: C Strings
- From: Malcolm McLean
- Re: C Strings
- References:
- C Strings
- From: cman
- Re: C Strings
- From: Malcolm McLean
- Re: C Strings
- From: Keith Thompson
- Re: C Strings
- From: Malcolm McLean
- Re: C Strings
- From: Richard Bos
- Re: C Strings
- From: Malcolm McLean
- C Strings
- Prev by Date: Re: Can someone please tell me where I am going wrong??
- Next by Date: Re: Bitfield casting
- Previous by thread: Re: C Strings
- Next by thread: Re: C Strings
- Index(es):
Relevant Pages
|