From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41100a78496a4c71 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-03 07:50:45 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: Nethack! (was): AdaGames Date: 3 Apr 2002 07:50:45 -0800 Organization: http://groups.google.com/ Message-ID: <4519e058.0204030750.78a30287@posting.google.com> References: <98104da8.0203280310.143a1c18@posting.google.com> <4519e058.0203290613.73b55af4@posting.google.com> <6g4gaugv9a85i56kvgcgmu4h2jkjprutec@4ax.com> <4519e058.0204010704.ed2cd06@posting.google.com> <4519e058.0204021030.14127b06@posting.google.com> NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1017849045 25854 127.0.0.1 (3 Apr 2002 15:50:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Apr 2002 15:50:45 GMT Xref: archiver1.google.com comp.lang.ada:22053 Date: 2002-04-03T15:50:45+00:00 List-Id: Preben Randhol wrote in message news:... > On 2 Apr 2002 10:30:14 -0800, Ted Dennison wrote: > > Juanma Barranquero wrote in message news:... > > > > Interesting. I usually use "grep -c ";"" for SLOC counting. "wc -l" > > shouldn't it be: grep -ce ";$" so you don't get all the semicolons in > the definitions of functions/procedures? For me no, for two reasons: 1) It can be argued that defining the interface elemets for subprograms is work on the same scale as any other ";"-ed line. 2) ";$" (semi's at the end of the line, for those who don't speak sed) doesn't get rid of them all anyway. In my code, it wouldn't be likely to get rid of *any*, as I always put only one formal parameter definition on a line. 3) "-c" only counts the *lines* where it appears, not the number of appearances. Thus even if ";$" *did* skip some single-line parameter definitions, the resulting count would end up nearly the same. Generally, I think SLOC is a stupid metric, so tons of effort should *not* be spent in calculating it or figuring out the perfect way to calculate it. For that reason, I wouldn't really blink at someone who uses your method, or most any other method. But methods that count both comments *and* blank lines are just a bit *too* slack. :-) -- T.E.D. Home - mailto:dennison@telepath.com (Yahoo: Ted_Dennison) Homepage - http://www.telepath.com/dennison/Ted/TED.html