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
... key was held, the screen editor allowed users 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 ...
List Of C-130 Hercules Crashes - Non-US Operators Crashes By Country - Canada
... as Lockheed Aircraft Service Company N9269R to Pacific Western Airlines, registered CF-PWO, line number 382, May 1967 ... Aircraft Company N7982S, sold to Pacific Western Airlines, registered CF-PWX, line number 384, December 1969 – crashed at Eastville, near Kisangani, Zaire, low fuel ... 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 ...
Charleroi Metro - Lines and Operation
... on the street as a normal tram after Pétria station, following a line of the old Vicinal network ... currently inactive A 7.5 km (4.7 mi) 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 ... significant reorganization of the tram lines using the system ...
Line Numbers and Syntax Errors
... will inform 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 ... in a source file and display an automatically generated line number as the location of the error ...
Color BASIC - Commands
... address of the program loaded off tape is used FOR {num} = {number} TO {number}.. ... 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 {command(s ...

Famous quotes containing the words number and/or line:

    You are the majority—in number and intelligence; therefore you are the force—which is justice. Some are scholars, others are owners; a glorious day will come when the scholars will be owners and the owners scholars. Then your power will be complete, and no man will protest against it.
    Charles Baudelaire (1821–1867)

    There is a line between a definite maybe and an indefinite yes.
    Mason Cooley (b. 1927)