Jump to content

Line of code

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 206.165.125.178 (talk) at 07:45, 3 November 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The definition of a "line of code" though basic to many software metrics lacks a formal definition. What a "line of code" means will certainly vary across languages, but it also varies for a given language.

In the C language, for example, a line of code might be (1) a statement terminated by a newline, (2) a statement terminated by a semicolon, or amy line in the program terminated by a newline (comments includes).

for (i=0; i<100; ++i) /* How many lines of code is this? */