Skip to main content
Added example output
Source Link

BBC BASIC

10 ON ERROR PRINT "You made a mistake on line ";ERL : EXIT
20 PRINT "Everything was going so well until..."
30 WHOOPS

BBC BASIC doesn't have an EXIT command. It should have been END.

As a result, EXIT creates a new error, and guess what happens next...!

(Full disclosure: This may have actually happened to the author, once or twice.)

The output would look like this:

> RUN
Everything was going so well until...
You made a mistake on line 30
You made a mistake on line 10
You made a mistake on line 10
You made a mistake on line 10
...

BBC BASIC

10 ON ERROR PRINT "You made a mistake on line ";ERL : EXIT
20 PRINT "Everything was going so well until..."
30 WHOOPS

BBC BASIC doesn't have an EXIT command. It should have been END.

As a result, EXIT creates a new error, and guess what happens next...!

(Full disclosure: This may have actually happened to the author, once or twice.)

BBC BASIC

10 ON ERROR PRINT "You made a mistake on line ";ERL : EXIT
20 PRINT "Everything was going so well until..."
30 WHOOPS

BBC BASIC doesn't have an EXIT command. It should have been END.

As a result, EXIT creates a new error, and guess what happens next...!

(Full disclosure: This may have actually happened to the author, once or twice.)

The output would look like this:

> RUN
Everything was going so well until...
You made a mistake on line 30
You made a mistake on line 10
You made a mistake on line 10
You made a mistake on line 10
...
Source Link

BBC BASIC

10 ON ERROR PRINT "You made a mistake on line ";ERL : EXIT
20 PRINT "Everything was going so well until..."
30 WHOOPS

BBC BASIC doesn't have an EXIT command. It should have been END.

As a result, EXIT creates a new error, and guess what happens next...!

(Full disclosure: This may have actually happened to the author, once or twice.)