Re: C Strings



"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)) like
you can with arrays. If not, why not? If so, how?

There is essentially no such thing as a C string.
^^^^^^^^^

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"
.



Relevant Pages

  • Re: An argument against modus ponens
    ... Sentences USUALLY have truth-values if they are in the ... but those are all FROM NATURAL language, ... value is not the same as the symbol or string that names it, ... 16 binary boolean functions some string is supposed to "mean" or point ...
    (sci.logic)
  • Re: clock scan oddity
    ... the same string with the character inserted. ... - no letter gives 6 hours differnce. ... rences given by the interpretation of different letters. ...
    (comp.lang.tcl)
  • Re: Incorrect use of documentary sources
    ... an interpretation, not word to word or literal translation. ... For example; " A string ... The above poster is again abusing this forum with his use of corrupt ...
    (rec.games.mahjong)
  • Re: info dicts?
    ... In my understanding is a dictionary just a specific interpretation of a ... string though. ... dict update dictionaryVariable key varName ?key varName ...? ...
    (comp.lang.tcl)
  • Re: Anonymous string constants
    ... If you want to save a string, ... "The interpretation semantics for S" are intended to provide a simple ... mechanism for entering a string in the interpretation state. ... ==> When the possibility of overwriting a string can arise, ...
    (comp.lang.forth)