Input/Output (IO)
Chris Wild
1 Description
-
Input/Output is the process of moving information into and out of a program.
-
Input can come from the keyboard, mouse, file or network.
-
Output can do to the computer screen, file or network.
-
This movement of information involves a conversion format from that of the input/output device into the format used by your program.
-
Problems in the input/output devices (file missing, network connection problems, bad I/O device) can cause I/O operations to fail.
-
Typically the information on an input/output device is not strongly typed while the information inside your program is strongly typed. Mismatches in the expected and actual type of information can cause errors in your program that may go undetected or they may cause problems that result in loss of synchronization or immediate failure of your program.
-
Information that comes from a computer keyboard is subject to typing mistakes. Thus your program must protect itself from bad input data.
Dealing with faulty input and devices greatly complicates I/O programming
2 Example
Please refer to chapter 3 in the book for examples.