OK, here is the read/write code. If you need any help, email me at adamsmasher23 at hotmail dot com.
if file exist("testing.txt")=1 then delete file "testing.txt"
rem State variables
a$="one"
b$="two"
c$="thr"
d$="fou"
e$="fiv"
f$="six"
a=1
b=2
c=3
d=4
e=5
f=6
open to write 1,"testing.txt"
rem This will write a label, the number as a string-e.g. one, and then write the number after it.
rem You have to write the number as a byte, or else when you write the string it won't
rem go to the next line. The same problem occurs if you don't use a .txt file, I think.
write string 1,a$
write byte 1,a
print a$,a
write string 1,b$
write byte 1,b
print b$,b
write string 1,c$
write byte 1,c
print c$,c
write string 1,d$
write byte 1,d
print d$,d
write string 1,e$
write byte 1,e
print e$,e
write string 1,f$
write byte 1,f
print f$,f
close file 1
open to read 1,"testing.txt"
rem This will read the string, and then load the appropriate variable.
for t=1 to 6
read string 1,str$
if str$="one" then read byte 1,a
if str$="two" then read byte 1,b
if str$="thr" then read byte 1,c
if str$="fou" then read byte 1,d
if str$="fiv" then read byte 1,e
if str$="six" then read byte 1,f
print str$
next t
print a
print b
print c
print d
print e
print f
Whatever I did it wasn't me!