Line Number

In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and incrementing by 1 for each successive line.

In the C programming language the line number of a source code line is one greater than the number of new-line characters read or introduced up to that point.

Line numbers were a required element of syntax in some older programming languages such as GW-BASIC. The primary reason for this is that most operating systems at the time lacked interactive text editors; since the programmer's interface was usually limited to a line editor, line numbers provided a mechanism by which specific lines in the source code could be referenced for editing, and by which the programmer could insert a new line at a specific point. Line numbers also provided a convenient means of distinguishing between code to be entered into the program and direct mode commands to be executed immediately when entered by the user (which do not have line numbers).

Largely due to the prevalence of interactive text editing in modern operating systems, line numbers are not a feature of most programming languages.

Read more about Line Number:  Line Numbers and Style, Line Numbers and GOTOs, Line Numbers and Syntax Errors

Famous quotes containing the words line and/or number:

    The middle years of parenthood are characterized by ambiguity. Our kids are no longer helpless, but neither are they independent. We are still active parents but we have more time now to concentrate on our personal needs. Our children’s world has expanded. It is not enclosed within a kind of magic dotted line drawn by us. Although we are still the most important adults in their lives, we are no longer the only significant adults.
    —Ruth Davidson Bell. Ourselves and Our Children, by Boston Women’s Health Book Collective, ch. 3 (1978)

    The more elevated a culture, the richer its language. The number of words and their combinations depends directly on a sum of conceptions and ideas; without the latter there can be no understandings, no definitions, and, as a result, no reason to enrich a language.
    Anton Pavlovich Chekhov (1860–1904)