TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
"Borgia, William M." <[log in to unmask]>
Date:
Tue, 12 Oct 1999 10:07:34 -0400
Content-Type:
text/plain
MIME-Version:
1.0
Reply-To:
"Borgia, William M." <[log in to unmask]>
Parts/Attachments:
text/plain (29 lines)
> On Tue, Oct 12, 1999 at 09:02:22AM -0400, Mike Smith wrote:
> > Does anyone know of a web/ftp site with a good SLOC counter for Ada?
>
> yes, the Unix command:                       :-)
>
> wc -l *.ad*
>
        [Borgia]

        Well, this only counts input lines, not necessarily code lines.  Of
course, one line of readable code may span several input lines.

        This has always been one of the debates on counting lines of code --
just what is a line.  On our project, we count semi-colons.  Thus a nested
statement counts as one line.  Our coding standards allow nesting at up to
three levels of depth.  Also, since conditional statements do not end with
semi-colons, any logic doesn't count.

        The point here is to define your standard line of code and stick to
it so that comparisons are meaningful.

        By the way, we developed our own semi-colon counter, though one
could easily develop a one-line Unix shell command.

        I wish that we wouldn't count any lines of code, but let's not start
that debate.

        Bill

ATOM RSS1 RSS2