Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: initializing an array Keywords: multi-dimension, no size specified. Message-ID: <914@twwells.uucp> Date: 11 May 89 03:28:21 GMT References: <12814@ut-emx.UUCP> <609@greens.UUCP> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 20 Summary: Expires: Sender: Followup-To: Distribution: In article <609@greens.UUCP> matthew@sunpix.UUCP ( Sun Visualization Products) writes: : | int a[][] = { : | { 1, 2, 3 }, : | { 4, 5, 6 }, : | { 7, 8, 9 }, <------ remove this excess ',' : | }; : | : | It is possible to determine from the syntax how many elements there : | are in each dimension, but my compiler complains about a null : | dimension. : : Of course it going to complain about a null dimension. You've got an extra ',' : in the initializer declaration. Wrong. A trailing comma in an initializer is perfectly legal. The problem with his code is that, while what he wants is possible, it is not part of the language. --- Bill { uunet | novavax } !twwells!bill