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.
 
 
 
 
 
 

31 lines
700 B

  1. 5 CALL SHELL("cls")
  2. 10 ON ERROR GOSUB 80
  3. 20 C = 0
  4. : REM C will hold the number of data items
  5. 25 PRINT "Reading data elements"
  6. 30 READ N
  7. 40 PRINT N
  8. 50 C = C + 1
  9. 70 GOTO 30
  10. 80 print "Error line #, error number # ";erl;err
  11. 90 PRINT "Read ";C;" data elements"
  12. : INPUT "Press enter :";w
  13. 100 DIM A(C)
  14. : REM now we can allocate the array to hold all data
  15. 110 RESTORE
  16. : REM MOVE data pointer to start
  17. 120 FOR I=1 TO C
  18. 130 READ A(I)
  19. 140 NEXT
  20. 150 print
  21. : print
  22. 160 PRINT "Array:"
  23. 170 FOR I=1 TO C
  24. 180 PRINT A(I);" ";
  25. 190 NEXT
  26. 195 PRINT
  27. 200 END
  28. 1000 DATA 12,107,0,20,443,218,232,468,561
  29. 1010 DATA 71,187,936,436,4,50,110,320,120