10 REM *******************************
20 REM * SAVE FLOATING POINT NUMBERS *
30 REM * TO FILES AND LOAD THEM BACK *
40 REM *******************************
100 CLS:X=RND(-ABS(TMR(0))):DIM A(10)
110 FOR I=1 TO 10
120 A(I)=RND(1):PRINT A(I);
130 NEXT:PRINT
140 OPEN "TEST",1,1
150 FOR I=1 TO 10
160 T=A(I):GOSUB 1000
170 NEXT:CLOSE 1
180 PAUSE 100
190 OPEN "TEST",1,0
200 FOR I=1 TO 10
210 GOSUB 2000:A(I)=T
220 PRINT A(I);:NEXT
230 CLOSE 1:END
999 REM *** SAVE NUMBERS TO FILE ***
1000 T$=STR$(T)
1010 FOR L=1 TO LEN(T$)
1020 PUT 1,ASC(MID$(T$,L,1))
1030 NEXT
1040 PUT 1,0:REM STRING TERMINATOR CHAR
1050 RETURN
1999 REM *** LOAD NUMBERS FROM FILE ***
2000 T$=""
2010 T=GET(1):IF T=0 THEN 2030
2020 T$=T$+CHR$(T):GOTO 2010
2030 T=VAL(T$):RETURN