Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!uunet!mcsun!ukc!mucs!logitek!grep!frank From: frank@grep.co.uk (Frank Wales) Newsgroups: comp.software-eng Subject: Re: Counting semicolons (was: Re: WANTED: "C" code line counter program) Message-ID: <1991Mar14.131931.14430@grep.co.uk> Date: 14 Mar 91 13:19:31 GMT References: <1991Mar6.214157.18633@ntpal.uucp> <9082@suns6.crosfield.co.uk> Reply-To: frank@grep.co.uk (Frank Wales) Organization: Grep Limited, LEEDS, UK Lines: 24 In article richard@iesd.auc.dk (Richard Flamsholt S0rensen) writes: >The only thing (somebody correct me if I'm wrong) that "terminates" >statements, are semicolons and right braces. > > The problem is, that > if (x == 7) { > y = 1; > } > - would count as two statements, thought that's actually quite correct; Then it's not a problem, is it? >Furthermore, if we >count }'s as statements this also makes function definitions, structs, >unions, enums and initializers - who all ends with a } - look like >statements. You mean you don't consider all that stuff to be statements? If one is attempting to make statement counts meaningful, surely they must include all components of the program, and that must include all the above. -- Frank Wales, Grep Limited, [frank@grep.co.uk<->uunet!grep!frank] Kirkfields Business Centre, Kirk Lane, LEEDS, UK, LS19 7LX. (+44) 532 500303