Line Number - Line Numbers and Syntax Errors

Line Numbers and Syntax Errors

If a programmer introduces a syntax error into a program, the compiler (or interpreter) will inform the programmer that the attempt to compile (or execute) failed at the given line number. This simplifies the job of finding the error immensely for the programmer.

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 manually specified. It is a simple matter for a program to count the newlines in a source file and display an automatically generated line number as the location of the error. In IDEs such as Microsoft Visual Studio or Xcode, in which the compiler is usually integrated with the text editor, the programmer can even double-click on an error and be taken directly to the line containing that error.

Read more about this topic:  Line Number

Famous quotes containing the words line, numbers and/or errors:

    When I had mapped the pond ... I laid a rule on the map lengthwise, and then breadthwise, and found, to my surprise, that the line of greatest length intersected the line of greatest breadth exactly at the point of greatest depth.
    Henry David Thoreau (1817–1862)

    The barriers of conventionality have been raised so high, and so strangely cemented by long existence, that the only hope of overthrowing them exists in the union of numbers linked together by common opinion and effort ... the united watchword of thousands would strike at the foundation of the false system and annihilate it.
    Mme. Ellen Louise Demorest 1824–1898, U.S. women’s magazine editor and woman’s club movement pioneer. Demorest’s Illustrated Monthly and Mirror of Fashions, p. 203 (January 1870)

    When a Man is in a serious Mood, and ponders upon his own Make, with a Retrospect to the Actions of his Life, and the many fatal Miscarriages in it, which he owes to ungoverned Passions, he is then apt to say to himself, That Experience has guarded him against such Errors for the future: But Nature often recurs in Spite of his best Resolutions, and it is to the very End of our Days a Struggle between our Reason and our Temper, which shall have the Empire over us.
    Richard Steele (1672–1729)