(TO) Function demo.

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

(TO) Function demo.

Post by XavSnap »

Code: Select all

10 LET A$="WORLD HELLO"
20 LET B$=A$(7 TO ) + A$(6) + A$(1 TO 5)
30 PRINT B$
40 LET E$=A$(7)
45 LET A$(7)=A$(1)
50 LET A$(1)=E$
60 PRINT A$,,
62 LET E$=A$(9 TO )+A$(4 TO 8)+A$( TO 3)
65 PRINT E$
70 FOR A=1 TO 11
80 PRINT AT 10,10;"HELLO WORLD"(A);"          "
90 NEXT A
100 FOR A=1 TO 11
110 PRINT AT 10,10;"HELLO WORLD"(1 TO A);"hello world "(A+1 TO )
120 NEXT A
200 FOR A=1 TO 12
210 PRINT AT 10,10;"HELLO WORLD "(A TO)(1);"hello world "(A+1 TO)
220 NEXT A
300 FOR A=1 TO 12
310 PRINT AT 10,10;"HELLO WORLD "(1 TO A)(13-A TO )
320 NEXT A
500 GOTO 70
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply