ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
584 B

  1. 10 rem WRITEINP.BAS -- Test WRITE # and INPUT # Statements
  2. 20 print "WRITEINP.BAS -- Test WRITE # and INPUT # Statements"
  3. 30 s1$ = "String 1"
  4. 40 s2$ = "String 2"
  5. 50 s3$ = "String 3"
  6. 60 x1 = 1.1234567
  7. 70 x2 = 2.2345678
  8. 80 x3 = 3.3456789
  9. 90 open "o", #1, "data.tmp"
  10. 100 write #1, s1$, x1, s2$, x2, s3$, x3
  11. 110 close #1
  12. 120 print "This is what was written:"
  13. 130 write s1$, x1, s2$, x2, s3$, x3
  14. 140 open "i", #2, "data.tmp"
  15. 150 input #2, b1$, n1, b2$, n2, b3$, n3
  16. 160 close #2
  17. 170 print "This is what was read:"
  18. 180 write b1$, n1, b2$, n2, b3$, n3
  19. 190 print "End of WRITEINP.BAS"
  20. 200 end