Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    "the BASIC interpreter will not execute a NEXT on a FOR loop that doesn't belong to it" - I know at least one family of old BASIC interpreters where this statement is wrong, you cannot generalize this to "all ancient BASIC interpreters". Commented Feb 17, 2014 at 8:45
  • The spec exists. Search for PDP-11 BASIC. Commented Feb 18, 2014 at 13:58
  • 1
    Thank you for taking a stab at this odd question. I have now confirmed that the BASIC used in the book, when encountering the second FOR statement having the same counter variable, forgets about the first FOR statement and restarts the loop from the second one. This contradicts your stab in the dark. It's an odious way to write loops, but BASIC is smelly stuff anyway. Commented Feb 18, 2014 at 14:03