TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
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*

        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.