LET S=S+50 without the LET

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

LET S=S+50 without the LET

Post by Shaun_B »

Consider this BASIC:

Code: Select all

  10 FOR S=-CODE "M" TO NOT PI STEP CODE "M"
  20 NEXT S
  30 PRINT AT NOT PI, NOT PI;"SCORE: ";S
  40 NEXT S
  50 GOTO 30
It works on EightyOne - in other words, each time you "NEXT S" you increase the S variable by the number specified in the "STEP" in line 10 (in this case 50)

I think this could be a byte-saver if used currectly.

Regards,

Shaun.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: LET S=S+50 without the LET

Post by XavSnap »

:shock:
Cool...
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply