commanderx16 / x16-docs

Commander X16 Documentation (CC BY-SA)
189 stars 64 forks source link

BASIC examples should use more spaces to make reading easier #84

Open mobluse opened 2 years ago

mobluse commented 2 years ago

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 2 years ago

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

mobluse commented 2 years ago

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.

Frosty-J commented 2 years ago

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.