Line Number

Line numbers were used in the days of line editors where each line of code had to be entered one line at a time directly into memory. To help both the computer and programmer to be able to easily reference each line, they were prefixed with a line number.

10 PRINT "Hello."
20 END

Line numbers are not commonly used by today's programming languages. However, some languages do support them for legacy reasons. One example is FreeBASIC.

Line Numbering Practices

Lines were usually numbered in 10's because if you ever had to insert additional lines, you had the space. For the same reason, some people would start their game code at line 50 or even 100 to make sure that they had space to insert new lines at the beginning if they needed to.

Related Pages

Program Languages that Use Line Numbers

Categories: Computer History : Program Flow : Programming
page_revision: 5, last_edited: 1237997447|%e %b %Y, %H:%M %Z (%O ago)