Next: Checkoff
Up: Fortran Programs
Previous: Runtime errors

Bugs

There is a third, even more insidious, kind of error that you can make, known as a ``bug.'' A bug is a problem only from the point of view of the programmer or the user of a program. Bugs cannot be detected by the compiler (as can syntactic errors) or by the computer (as can runtime errors). For an example of a simple bug, go to the sample program and change the division sign in ``Z = X / Y'' to an addition sign. Now compile and run the program. What's the bug?

Click here for the answer

Only you, as the programmer, can detect and correct a bug. Bugs in large programs can be hard to find, so the best policy is to avoid putting them in!


Next: Checkoff
Up: Fortran Programs
Previous: Runtime errors

Hamlet Project
hamlet@cs.utah.edu