19RECEIVING FILE INPUT AND OUTPUT

image

The programs you’ve written so far in this book took input from the keyboard and sent output to the screen. But what if you wanted to create a virtual phone book and use thousands of lines of data in the program? Working with that much data could make it difficult to write and maintain your program. You’d have to input every name and phone number each time you ran the program!

Fortunately, a program can also receive input from a file and send its output to a file, and both files can be saved on your computer. So all the phone book information could be neatly tucked away in a file, and you’d only have to input ...

Get Learn to Program with Small Basic now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.