home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!unixhub!ditka!eagercon!eagercon!eager
- From: eager@eagercon.com (Michael J. Eager)
- Subject: Re: Problem with string processing.
- Message-ID: <1993Jan12.075949.5948@eagercon.com>
- Sender: root@eagercon.com (Operator)
- Reply-To: eager@eagercon.com
- Organization: Eager Consulting
- References: <846@ulogic.UUCP>
- Date: Tue, 12 Jan 1993 07:59:49 GMT
- Lines: 25
-
- In article 846@ulogic.UUCP, hartman@ulogic.UUCP (Richard M. Hartman) writes:
- >
- >tmp[0] and tmp[1] are NOT separate 'char's, they are a part of an
- >array, the initialization of which is governed by it's own set
- >of rules.
- >
- >In K&R (the original, sorry) section 4.9, near the end, regarding
- >array initialization it says "If there are fewer initializer than
- >the specified size, the others will be zero."
- >
- >I am certain that this rule has been carried up.
-
- Oops. You are right. I didn't read far enough.
-
- The relevant sentence is "If there are fewer initializers in a brace-enclosed
- list thatn there are members of an aggregate, the remainder of the aggregate
- shall be initialized implicitly the same as objects that have static storage
- duration."
-
-
- ---
- Michael J. Eager Michael.Eager@eagercon.com
- Eager Consulting (415) 325-8077
- 1960 Park Boulevard, Palo Alto, CA 94306-1141
-
-