Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #20401

Re: strchr with its second argument = 0

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Fri, 04 May 2012 18:32:16 -0500
Message-ID <4FA466D2.59AD@mindspring.com> (permalink)
Date Fri, 04 May 2012 19:31:30 -0400
From pete <pfiland@mindspring.com>
Reply-To pfiland@mindspring.com
Organization PF
X-Mailer Mozilla 3.04Gold (WinNT; I)
MIME-Version 1.0
Newsgroups comp.lang.c
Subject Re: strchr with its second argument = 0
References <jo17lh$g8u$1@news.belwue.de> <20120504123326.903@kylheku.com> <20120504123921.569@kylheku.com>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Lines 31
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 4.156.228.57
X-Trace sv3-kaXsK6vGffpfQoIdLJi4kfge9NIzrcgGC6l+MjnxF6hIfUvf5hRDGw57RAwJs3INaGNyhrchwFYo1ix!mdS7o0bqBvg5AGzVrzFyOm4ydKcvwBSpExlilBgHC/pvGtNzEA5nhHPl25Zk5KN/CY3nynIZiso5!tiBHAbCjIQ==
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2007
Xref csiph.com comp.lang.c:20401

Show key headers only | View raw


Kaz Kylheku wrote:
> 
> On 2012-05-04, Kaz Kylheku <kaz@kylheku.com> wrote:

> > The null character isn't a character
> > which is in the string. By definition of a C string,
> > a C string cannot contain
> > the null character.
> 
> Sorry; that's wrong! I was staring at the definition in C99,
> and somehow read
> that as "the terminating null character is *not* considered
> part of the string"; but the word "not" is not there.
> 
> (Of course; why would such text even be included
> other than to give a special
> exception to the definition of a string.)

Such text in the definition of strchr, would be included 
to remind you of how a string is actually defined.

ISO/IEC 9899:1999 (E)
7.    Library
7.1   Introduction
7.1.1 Definitions of terms
1     A string is a contiguous sequence of characters 
      terminated by 
      and including the first null character.

-- 
pete

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

strchr with its second argument = 0 Thomas Richter <thor@math.tu-berlin.de> - 2012-05-04 20:37 +0200
  Re: strchr with its second argument = 0 Ralf Damaschke <rwspam@gmx.de> - 2012-05-04 18:45 +0000
  Re: strchr with its second argument = 0 Kaz Kylheku <kaz@kylheku.com> - 2012-05-04 19:49 +0000
    Re: strchr with its second argument = 0 Kaz Kylheku <kaz@kylheku.com> - 2012-05-04 19:53 +0000
      Re: strchr with its second argument = 0 pete <pfiland@mindspring.com> - 2012-05-04 19:31 -0400
        Re: strchr with its second argument = 0 Kaz Kylheku <kaz@kylheku.com> - 2012-05-05 02:22 +0000
  Re: strchr with its second argument = 0 pete <pfiland@mindspring.com> - 2012-05-04 19:39 -0400

csiph-web