I've not programmed anything in 30 years and am really struggling with many things.
This caught my eye while I was reading a few threads earlier this evening and I wonder if anyone could post an explanation of line 20.
The rest is simple enough to follow and I think I kind of somewhat get it, but not totally, so please assume I know nothing.
10 LET A$=" HELLO USER. THIS IS THE BEST COMPUTER IN THE WORLD. THE SINCLAIR ZX81 "
20 LET A$=A$(2 TO )+A$(1)
30 PRINT AT 10,1;A$(1 TO 30)
40 GOTO 20
Also, if this is covered in the SINCLAIR BASIC manual and anyone knows what page it's on, please let me know that too.
Thanks in advance to anyone that might respond.
Line 20 takes position 2 to the end of the text and adds position 1 at the back.
The next time it does the same, but then position 1 is taken by original position 2.
In this way the text moves to right and is added at the back.
1 LET X=SGN PI
2 LET Y=VAL"31"
3 FOR I=NOT PI TO SGN PI STEP NOT PI
4 PRINT AT 0,0;" ... SCROLLY DEMO BY DONKEYSOFT MMXX ... HELLO TO ALL ZX-FANZ OUT THERE ... "(X TO X+Y)
5 LET X=X+1
6 IF X=106 THEN LET X=SGN PI
7 IF NOT NOT INKEY$ THEN LET I=I+SGN PI
8 NEXT I
To speed up the code, you had to use FP values in the loop.
The FOR line is read one time, but all lines incude in the FOR/next had to be changed.
We can't save memory in the room…
7 IF NOT NOT INKEY$ THEN LET I=I+SGN PI
Or 7 IF NOT INKEY$ THEN NEXT I
8 line deleted.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
1 LET B$="3086"
2 LET A=USR VAL B$
3 PRINT "@80@00@01@02@87@04@05@83@03@85@81@82@07@84@06@86"(RND*15+1);
4 LET A=A+1
5 IF A=32 THEN GOTO PI-PI/PI
6 GOTO PI
Xavier ...on the Facebook groupe : "Zx81 France"(fr)