5 REM FIELD variable test
10 OPEN "DUMMY" AS 1
20 OPEN "FIELD.TXT" FOR OUTPUT AS 2
30 FIELD #1, 20 AS A$
40 FIELD #1, 10 AS B$, 10 AS C$
50 FIELD #1, 20 AS D$
60 FIELD #1, 20 AS E$(0)
70 FIELD #1, 20 AS E$(1)
80 RSET A$="1234": GOSUB 1000
90 LSET B$="5678": GOSUB 1000
100 LSET C$="abcd": GOSUB 1000
110 D$="DETACHED": GOSUB 1000
120 SWAP C$, B$: GOSUB 1000
130 SWAP E$(0), E$(1): GOSUB 1000
140 SWAP D$, E$(1): GOSUB 1000
150 RSET D$="test": GOSUB 1000
160 RSET E$(1)="TEST": GOSUB 1000
900 CLOSE
910 END
1000 WRITE #2, A$, B$, C$, D$, E$(0), E$(1)
1010 RETURN
