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*

7
  • 2
    Thank you so much for this very elaborate answer! The part about the initial value of t in the FOR loop (t0+t*60) being put on a stack and referenced throughout the loop really cleared it up for me. Indeed this also makes sense for a simple loop like FOR t=1 TO 10 - that 10 has to be stored somewhere after all... :) Commented Feb 4, 2021 at 20:34
  • Note that this doesn't apply to Locomotive BASIC. It doesn't pause at all, printing something like START: 18994; END: 19024 - that is, 0.1s later Commented Feb 5, 2021 at 1:11
  • @Raffzahn yes I pasted in your code exactly as you wrote it. It didn't pause at all. Commented Feb 5, 2021 at 1:28
  • 2
    @Raffzahn - that's not an emulator, that's an implementation ("CPC BASIC Unleashed"). It doesn't get things quite right Commented Feb 5, 2021 at 1:47
  • 1
    @scruss Ok, this is becoming real fun. Found another emulator (real crappy handling) but this time it works as you told. Seams like as if Locomotive BASIC's FOR does the assignment, but then compares to the previous value of T, which ofc is lower than the new one. Commented Feb 5, 2021 at 2:14