Alex Rivera | Logout

Why BASIC had numbered lines?

Asked 2010-03-12T20:02:12.013
18

Possible Duplicate:
Why did we bother with line numbers at all?

I'm curious about why early versions of the BASIC programming language had line numbering like in:

42 PRINT "Hello world!"

The text editors back then had no line numbering?

EDIT: Yes, I know they are used for GOTOs, but why? I mean having labels was too computationally expensive?

Edit
Report

1 Answer

3

They were labels for statements, so that you could GOTO the line number. The number of the statements did not necessarily have to match the physical line numbers in the file.

answered 2010-03-12T20:04:02.963

Your Answer