Path: csiph.com!x330-a1.tempe.blueboxinc.net!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: Tue, 08 Nov 2011 10:49:34 -0600 Message-ID: <4EB95D9D.4ECE@mindspring.com> Date: Tue, 08 Nov 2011 11:49:33 -0500 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Array of Integers ? References: <4eb8df96$0$281$14726298@news.sunsite.dk> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 75 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.218.253 X-Trace: sv3-1TJxPNE9pdXJEUgW/HyQJkPFStWMNumd405GBKeC1c3s1GP3TD3IINqt8/HBJveVLB45RRpO/Jyku0t!YAF/tlS1Puj4XFfK6PpR2cllKnhO5Foce94s6TFZMKefGjpjePLBl16aLMh1ijzmLuyqlT6AyU71!ez+Vo7arD7s= 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: 3268 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:12900 Chad wrote: > > On Nov 8, 12:14 am, jacob navia wrote: > > Le 08/11/11 08:51, arnuld a écrit : > > > > > I wrote my blog on Insertion Sort some time back > > > and used words "Array of > > > Integers" on that. I was told by someone > > > that there is nothing like array > > > of integers in C. C has array of objects only. > > > > > So how do we differentiate between array of integers and array of > > > characters (not string constant) > > > in communication if there is no such > > > thing as array of integers ? > > > > You define an array of integers like this: > > > > int array[256]; > > > > The person that told you that arrays of > > integers do not exist in C is > > completely wrong. > > > > What about the following... > > http://67.40.109.61/torek/c/expr.html > > And I quote.. > > C does not have array values. (There is one > exception to this, which I will save for later.) Unless the case which is under discussion here and now, happens to be the "one exception to this" which he was saving for later, he's wrong. ISO/IEC ISO/IEC 9899:1999 (E) 6.7.8 Initialization Semantics 8 An initializer specifies the initial value stored in an object. 16 Otherwise, the initializer for an object that has aggregate or union type shall be a brace enclosed list of initializers for the elements or named members. > The point being that, if I understand correctly, C does not have > 'array of integers'. Instead, at least according to the former > comp.lang.c regular on here, the language has 'array objects'. Given, as above: int array[256]; then (array), is an "array of 256 int". ISO/IEC 9899:1999 (E) 6.2.5 Types 17 The type char, the signed and unsigned integer types, and the enumerated types are collectively called integer types. 20 An array type is said to be derived from its element type, and if its element type is T, the array type is sometimes called ‘‘array of T’’. Since int is an integer type, I don't see anything wrong with calling (array) "an array of integers". -- pete