Report R1: LOC counting standard

Produce a standard specifying how you will count LOC. Objectives: to define the LOC counting standards that are appropriate for the programming language you use, to provide a basis for developing a coding standard, and to prepare for developing a program to count LOC.

Table 2-3. LOC counting standard for this independent study

Definition Name:C++ coding standardLanguage:C++
Author:Victor B. PutzDate:991222
Count TypeTypeComments
Physical/LogicalLogical 
Statement TypeIncluded?Comments
ExecutableYes 
Nonexecutable:  
DeclarationsyesVariable declarations, etc.
Compiler directivesnoParticularly for the PSP problems, this will be simple. As I add "include guards" on every file #included in a C++ file, adding compiler directives will swell LOC counts unacceptably.
CommentsnoNot appropriate-- they do not add complexity. No comments (standalone, banners, inline) should be counted as a LOC.
ClarificationsIncludedExamples/Cases
Empty statementsnoEmpty statements do nothing, so should not be counted as adding complexity, imho.
begin/end pairs ({})noBrackets signify compound statements, but I'm interested in the statements themselves rather than their grouping. Since my code standard uses brackets for all statements in for-loops, if-branches, etc., including brackets would significantly inflate LOC.
End symbols (;)noThese signify the ends of logical statements, but the coding style will have one logical line per physical line. For-loops have multiple semicolons in the header, but since I view the for-loop as a single construct (and won't do additional processing in the header), this should be fine.
Then, else, ifyes"else if" will be counted as one statement
Keywordsyeslone keywords (case, do, else, enum, for, etc...)

Table 2-4. LOC counting standard for this independent study

Definition Name:Eiffel coding standardLanguage:Eiffel
Author:Victor B. PutzDate:991222
Count TypeTypeComments
Physical/LogicalLogical 
Statement TypeIncluded?Comments
ExecutableYes 
Nonexecutable:  
DeclarationsyesVariable declarations, etc.
Compiler directivesn/a(no compiler directives for SmallEiffel)
CommentsnoNot appropriate-- they do not add complexity. No comments (standalone, banners, inline) should be counted as a LOC.
ClarificationsIncludedExamples/Cases
Empty statementsnoSame as C++; I will not use semicolons unless necessary to denote empty statements.
begin/end pairsnoSame logic as with C++. Begin/end is used a great deal in Eiffel (feature sections, etc.) but I would rather not count these.
End symbols (;)noAs mentioned-- I won't delimit statements with semicolons, so shouldn't count them.
Keywordsyeslone keywords (inspect, from, until, loop, etc.)