commanderx16/x16-docs

BASIC examples should use more spaces to make reading easier

mobluse opened this issue · 3 comments

I think the BASIC examples should use more spaces to make reading easier. E.g.

10 SCREEN$80
20 FORI=1TO20:FRAMERND(1)*320,RND(1)*200,RND(1)*320,RND(1)*200,RND(1)*128:NEXT
30 GOTO20

could be:

10 SCREEN $80
20 FOR I=1 TO 20:FRAME RND(1)*320,RND(1)*240,RND(1)*320,RND(1)*240,RND(1)*128:NEXT
30 GOTO 20

I also changed 200 to 240 since now larger effective screen.

irmen commented

yeah I noticed that as well that in various places in the documentation the new screen size of mode $80 is not mentioned yet.

I noticed that line 20 will be too long if one inserts all the spaces, but this works:

10 SCREEN $80
20 FORI=1TO20:FRAME RND(1)*320,RND(1)*240,RND(1)*320,RND(1)*240,RND(1)*128:NEXT
30 GOTO 20

The examples should be possible to paste into the emulator.

The other day I was trying to find out what the FORT command or variable is. I soon realised it's FOR T, but yeah, spaces would be nice. IFOBTHENLINEOX is even less clear. Probably your example could have the FOR and NEXT moved to new lines, as these examples don't have to make the most of the clock cycles.