16
2 Motivation
2.4.4 Frequent Errors
Errors are frequently associated with misspelling such as “0” (zero) instead of the
letter “o” or vice versa, or mistaking “1” (one) as the letter “l”. Often an ENDDO,
ENDIF or a bracket is just missing.
2.4.5 Trust Your Compiler
Important is to always trust the compiler. If there is an error message then there is an
error in your code. The error message text might be misleading, but the presence of
at least one error is a fact. In a state of frustration after endless unsuccessful search
after errors, the reader should take a good rest, perhaps a walk or a sleep. Breaks are
always important!
2.4.6 Display Warnings
Warnings can be displayed with addition of “-Wall” (display all warnings) in the
compiling command. For Exercise 1, for example, this command reads:
g95 -Wall -o winethief.exe winethief f95
Warning messages should be explored for potential errors in the code.
Précédent

- 30/185

Suivant