04-03-2003, 11:43 PM
making a grade sheet! save the score a person took each time and save it, print all the grades out in one screen, anyone can show me one example?
save/read/print off disk......
|
04-03-2003, 11:43 PM
making a grade sheet! save the score a person took each time and save it, print all the grades out in one screen, anyone can show me one example?
04-04-2003, 01:32 AM
I would use OPEN.
To save data, use OPEN "file.txt" FOR OUTPUT AS #1 PRINT #1, score(or other variable) CLOSE #1 To load data, use OPEN "file.txt" FOR INPUT AS #1 INPUT #1, score(or other variable) CLOSE #1
04-15-2003, 09:07 AM
Be careful with OPEN FOR OUTPUT. When you open a file for output it gets rid of data already in the file. You'd want to use this:
Code: INPUT "Enter score you wish to add to the list: ", Score This code will allow you to keep adding scores to the end of the list without erasing previous entries. Then, to read the scores: Code: OPEN "scores.txt" FOR INPUT AS #1 Alternatively, you could just print the file "scores.txt" to get a printed list of scores. *peace* Meg. |
« Next Oldest | Next Newest »
|