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:

    It is a great many years since at the outset of my career I had to think seriously what life had to offer that was worth having. I came to the conclusion that the chief good for me was freedom to learn, think, and say what I pleased, when I pleased. I have acted on that conviction... and though strongly, and perhaps wisely, warned that I should probably come to grief, I am entirely satisfied with the results of the line of action I have adopted.
    Thomas Henry Huxley (1825–95)

    All experience teaches that, whenever there is a great national establishment, employing large numbers of officials, the public must be reconciled to support many incompetent men; for such is the favoritism and nepotism always prevailing in the purlieus of these establishments, that some incompetent persons are always admitted, to the exclusion of many of the worthy.
    Herman Melville (1819–1891)

    A happy people I call them still, whose peace and genuine morals have not been contaminated with European vices; and whose errors are only the errors of ignorance, and not the rooted depravity of a pretended civilization, and a spurious and mock Christianity.
    —J.G. (John Gabriel)