EasyManua.ls Logo

Sinclair ZX81 - Page 61

Sinclair ZX81
92 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Whereas B$ contains mere quote image characters (with code 192), A$ contains genuine string quote
characters (with code 11).
3. Run this program:
10
LET
A$="
LEN
""
ABDC
""
"
100
PRINT
A$;" = ";
VAL
A$
This will fail because
VAL
does not treat the quote image
""
as a string quote.
Insert some extra lines between 10 & 100 to replace the quote images in A$ by string quotes (which you
must call
CHR$
11), & try again.
Make the same modifications to the program in chapter , extercise 3, & experiment with it.
4. This subroutine deletes every occurance of the string "CARTHAGO" from A$.
1000
FOR
N=1
TO LEN
A$-7
1020
IF
A$(N
TO
N+7)="CARTHAGO"
THEN LET
A$(N TO N+7)="********"
1030
NEXT
N
1040
RETURN
Write a program that gives A$ various values (e.g. "DELENDA EST CARTHAGO.") & applies the
subroutine.

Other manuals for Sinclair ZX81

Related product manuals