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

Other articles related to "lines, line, line number, number, line numbers":

Commodore BASIC - Technical Details
... to enter direct commands or to input and edit program lines from anywhere on the screen ... If a line was prefixed with a line number, it was tokenized and stored in program memory ... Lines not beginning with a number would be executed simply by pressing the RETURN key whenever the cursor happened to be on the line ...
Color BASIC - Commands
... If none specified, the execute address of the program loaded off tape is used FOR {num} = {number} TO {number}.. ... (num) creates a loop where the numeric variable (num) runs from start number to end number in increments of number (STEP) ... If step is omitted, 1 is assumed GOSUB line number} calls the subroutine at the line number specified GOTO {line number} jumps to the program's line number specified IF {test} THEN {comm ...
Charleroi Metro - Lines and Operation
... tram after Pétria station, following a line of the old Vicinal network ... branch which is actually a conventional tram line running in the middle of the street, running north towards Gosselies and equipped with 18 tram stops, is currently under construction and should open in 2013 ... loop in 2012 led to a significant reorganization of the tram lines using the system ...
List Of C-130 Hercules Crashes - Non-US Operators Crashes By Country - Canada
... Service Company N9269R to Pacific Western Airlines, registered CF-PWO, line number 382, May 1967 ... as Lockheed Aircraft Company N7982S, sold to Pacific Western Airlines, registered CF-PWX, line number 384, December 1969 – crashed at Eastville, near Kisangani, Zaire ... April 11, 1982 L-100 c/n 4170, delivered September 1966, Delta Air Lines N9258R, line number 302, October 1966, modified to L-100-20, August 1970, sold to Pacific Western Airlines, CF-PWK, line number 386 ...
Line Numbers and Syntax Errors
... the programmer that the attempt to compile (or execute) failed at the given line number ... The use of line numbers to describe the location of errors remains standard in modern programming tools, even though line numbers are never required to be ... a program to count the newlines in a source file and display an automatically generated line number as the location of the error ...

Famous quotes containing the words number and/or line:

    States strong enough to do good are but few.
    Their number would seem limited to three.
    Robert Frost (1874–1963)

    I love them
    for finding what
    I can’t find,
    and for loving me
    for the line I wrote,
    and for forgetting it....
    Denise Levertov (b. 1923)