I have simplified this as much as I can..
Now even the most Novice beginner should be able to store and retrieve data easily..
Although this wasn't my intended plan, I guess I don't want to reinvent the entire wheel !
When I first started learning programming this is the style of lessons I saw..
And in 1982 I thought space bar had something to do with gaming, even though I didn't have any games at the time.
Programming was my game (self taught)
The program is easier to understand once it is in the BBC editor
Code: REM THE SIMPLEST FILE DATA MANAGEMENT EXAMPLE ON THIS FORUM !!
REM OPEN A FILE FOR OUTPUT AND WRITE 4 DIFFRENT PIECES OF DATA (Even if it doesnt look like it)
A=OPENOUT(@usr$+"JUNK.DAT")
REM The next command line will write 3 strings and 1 number to the file*******
REM VVVVV notice how A becomes #A as an identifier or device handle FOR THE FILE YOU MAKE***
PRINT#A,"REALLY?","THERE ARE",4,"DATA SECTIONS TO THIS DATA"
CLOSE#A
REM OPEN A FILE AND READ THE CONTENTS AND PRINT THEM ON THE SCREEN
A=OPENIN(@usr$+"JUNK.DAT")
REM VVVVV notice how A becomes #A as an identifier or device handle FOR THE FILE YOU READ***
INPUT#A,A$,B$,N,C$
PRINT A$;" ";B$;" ";N;" ";C$
REM ^^^^^^ The read must be the same as the written file for accuracy ^^^^^
REM break down the elements of the data so they can see
PRINT
PRINT "1 ";A$
PRINT "2 ";B$
PRINT "3 (this is not a string) -";N
PRINT "4 ";C$
CLOSE#A
END