saving array data is a pretty straight forward process.
make sure tho that what you save is read in the same way or nightmares will befall you.
randomize timer()
dim rndnum(3)
filename$ = "rndnum.dat"
rndnum(0)=rnd(1000)
rndnum(1)=rnd(1000)
rndnum(2)=rnd(1000)
rndnum(3)=rnd(1000)
print " 0 ",rndnum(0)
print " 1 ",rndnum(1)
print " 2 ",rndnum(2)
print " 3 ",rndnum(3)
print " saving...",filename$
sleep 1000
save array filename$,rndnum(3)
print "loading...",filename$
load array filename$,rndnum(3)
print " 0 ",rndnum(0)
print " 1 ",rndnum(1)
print " 2 ",rndnum(2)
print " 3 ",rndnum(3)
sleep 1000
suspend for key
end
writing a string is pretty basic as well
filename$="myfile.txt"
print "make a small file"
if file exist(filename$) then delete file filename$
open to write 1,filename$
write string 1,"hello world this is a string from a text file"
close file 1
print "Finished"
Open To Read 1,"myfile.txt"
Read String 1,myword$
Close File 1
print myword$
SYNC : SYNC
suspend for key
end
you can also read and write bytes but ill let you explore that, otherwise you wont learn stuff and thats detrimental to your creative process.
If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself