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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.