Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!atanasoff!hascall From: hascall@atanasoff.cs.iastate.edu (John Hascall) Newsgroups: comp.lang.c Subject: Re: Point me in the right direction Message-ID: <807@atanasoff.cs.iastate.edu> Date: 17 Feb 89 15:39:14 GMT References: <23631@watmath.waterloo.edu> <1841@mit-caf.MIT.EDU> Reply-To: hascall@atanasoff.cs.iastate.edu (John Hascall) Organization: Iowa State U. Computer Science Department, Ames, IA Lines: 29 In article <1841@mit-caf.MIT.EDU> vlcek@mit-caf.UUCP (Jim Vlcek) writes: >rbutterworth@watmath.waterloo.edu (Ray Butterworth) writes: > >>Another handy style guideline to follow is trying to avoid writing >>empty [] declarations. > ... In fact, for an array which is fully >initialized at compile time, an empty [] declaration is preferable: >double fund_consts[] = { > 3.14159265, > 2.7182818, > 6.02E23, >}; Of course, adding: #define N_FCONSTS (sizeof(fund_consts)/sizeof(double)) then you can use stuff like: extern fund_consts[N_FCONSTS]; elsewhere. John Hascall ISU Comp Center