basiczxspectrum

Unable to enter a FOR loop in ZX Spectrum BASIC type-in


I'm trying to get back into Spectrum BASIC and have been reading an old manual, so am looking at the very basics of BASIC.

I've been trying to type the following line of code in to create the opening of a loop.

10 FOR i=0 TO 5

However, if I press enter after typing it in then it says there is an error with the TO (at least I assume what the flashing ? next to it represents) and won't let me submit the line. I've tried this on both ZXSpin and an online emulator, same result. What am I doing wrong?


Solution

  • The Spectrum's BASIC programming language utilizes a unique set of keywords that can be entered with single keypresses.
    To use these keywords to write a program press the respective key in the keyboard.
    Don't write the keywords yourself using letters.