home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19578 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!unixhub!ditka!eagercon!eagercon!eager
  3. From: eager@eagercon.com (Michael J. Eager)
  4. Subject: Re: Problem with string processing.
  5. Message-ID: <1993Jan12.075949.5948@eagercon.com>
  6. Sender: root@eagercon.com (Operator)
  7. Reply-To: eager@eagercon.com
  8. Organization: Eager Consulting
  9. References: <846@ulogic.UUCP>
  10. Date: Tue, 12 Jan 1993 07:59:49 GMT
  11. Lines: 25
  12.  
  13. In article 846@ulogic.UUCP, hartman@ulogic.UUCP (Richard M. Hartman) writes:
  14. >
  15. >tmp[0] and tmp[1] are NOT separate 'char's, they are a part of an
  16. >array, the initialization of which is governed by it's own set
  17. >of rules.
  18. >
  19. >In K&R (the original, sorry) section 4.9, near the end, regarding 
  20. >array initialization it says "If there are fewer initializer than 
  21. >the specified size, the others will be zero."
  22. >
  23. >I am certain that this rule has been carried up. 
  24.  
  25. Oops.  You are right.  I didn't read far enough.  
  26.  
  27. The relevant sentence is "If there are fewer initializers in a brace-enclosed
  28. list thatn there are members of an aggregate, the remainder of the aggregate 
  29. shall be initialized implicitly the same as objects that have static storage
  30. duration."
  31.  
  32.  
  33. ---
  34. Michael J. Eager        Michael.Eager@eagercon.com
  35. Eager Consulting        (415) 325-8077 
  36. 1960 Park Boulevard, Palo Alto, CA 94306-1141
  37.  
  38.