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:

    I had crossed de line of which I had so long been dreaming. I was free; but dere was no one to welcome me to de land of freedom. I was a stranger in a strange land, and my home after all was down in de old cabin quarter, wid de ole folks, and my brudders and sisters. But to dis solemn resolution I came; I was free, and dey should be free also; I would make a home for dem in de North, and de Lord helping me, I would bring dem all dere.
    Harriet Tubman (c. 1820–1913)

    Even in ordinary speech we call a person unreasonable whose outlook is narrow, who is conscious of one thing only at a time, and who is consequently the prey of his own caprice, whilst we describe a person as reasonable whose outlook is comprehensive, who is capable of looking at more than one side of a question and of grasping a number of details as parts of a whole.
    G. Dawes Hicks (1862–1941)