TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
"Borgia, William M." <[log in to unmask]>
Reply To:
Borgia, William M.
Tue, 12 Oct 1999 10:07:34 -0400
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.