Talk:Line number

don't use 10
Say why you use 10 20 30 40? Is that to leave room for later lines between?

Also don't use 10 in the example as it could get confused with a line number. Use e.g., 62. — Preceding unsigned comment added by 210.200.105.228 (talk • contribs) 23:59, 7 February 2006‎

Other languages
Do any other computer languages apart from BASIC use line numbers? — Preceding unsigned comment added by SlipperyHippo (talk • contribs) 22:41, 16 March 2007‎
 * Yes - Fortran, though in this respect it has evolved over the years in more or less the same way as BASIC has. — Smjg (talk) 13:03, 2 November 2011 (UTC)


 * In robotics, a dialect named MELFA BASIC is still very relevant, particularly as 20 years is only middle age for an industrial robot. Later versions have labels too. — Preceding unsigned comment added by 193.166.148.3 (talk • contribs) 11:27, 24 January 2012 (UTC)

Line 0
There's no comment on what is a legal line number. Of course the valid range varies from dialect to dialect, but it would be interesting to look at variations in whether non-positive or non-integer line numbers are allowed, and whether certain line numbers (such as 0) are special in some way.

I remember Sinclair BASIC not allowing you to enter a line 0 normally, though you could change a line's number to 0 using a POKE. So effectively, you could write-protect the first line of a program by numbering it 0. And Beta BASIC defining its own line 0 that is some magical thing to support the functions it adds to the language - NEW would clear the program space except for this one line, but loading a standard Sinclair BASIC program would erase line 0, thereby disabling these functions for the rest of the BB session. — Smjg (talk) 13:03, 2 November 2011 (UTC)


 * I added a table comparing the range of valid line numbers in early BASIC implementations, extracted from a table I prepared for Tiny BASIC. --Jeffrey Henning (talk) 14:51, 15 September 2020 (UTC)
 * Your table is super useful, but would you please add in the citations for each machine in the table? Alternately, please publish it somewhere, like github.com or archive.org, so that it won't just disappear when some wikipedian notices that it has no citations to back it up.
 * Also, If you have the information, I'd ideally like to see columns for year of introduction of the dialect, manufacturer, and a short note on why a specific max was chosen. For example:
 * {| class="wikitable sortable"

! Dialect !! First Released !! Maximum Line Number !! Rationale
 * + Line number limits in early BASIC
 * DEC BASIC-Plus || 1971 || 32767 || Signed 16-bit integer
 * TRS-80 Model I Level 2 BASIC || 1978 || 65529 || Unsigned 16-bit integer, with 65530–5 reserved for system use.
 * }
 * Ben (talk) 01:51, 25 August 2022 (UTC)
 * }
 * Ben (talk) 01:51, 25 August 2022 (UTC)
 * Ben (talk) 01:51, 25 August 2022 (UTC)
 * Ben (talk) 01:51, 25 August 2022 (UTC)
 * Ben (talk) 01:51, 25 August 2022 (UTC)