Basic/data/READWR.BAS

22 lines
351 B
QBasic

5 DIM b(30)
8 DIM a(30)
9 DIM c(30)
10 OPEN "zahlen.txt",r
20 FOR i=1 TO 30
30 FREAD a(i),b(i),c(i),#a,#b
50 NEXT i
60 CLOSE
70 FOR i=1 TO 30
80 PRINT a(i),b(i),c(i),#a,#b
90 NEXT i
95 END
100 OPEN "zahlen.txt",w
110 FOR i=1 TO 30
120 x=i*2.4:y=i*1.86:z=3.21*i
122 #a="Das ist cool"
123 #b="oder nicht?"
130 WRITE x,y,z,#a,#b
140 NEXT i
150 CLOSE