2.4 Detection and Elimination of Errors
15
Fig. 2.2 Evolution of concentration (%) as a function of time. The upper and lower curves show
results using the implicit and the explicit schemes, respectively. The middle curve displays the
analytical solution according to Eq. 2.8
2.4 Detection and Elimination of Errors
2.4.1 Error Messages
If a FORTRAN code contains errors, the compiler will return one or more error
messages. There are a few important steps to follow for successful detection and
elimination of errors.
2.4.2 Correct Errors One by One
Only correct one error at a time with reference to the f rst error message. Often other
errors are just followers of the f rst one. Similarly, an important rule is that the code
should be compiled after each single alteration made. It can be tedious to locate
errors after a dozen changes have been implemented without verification Errors are
often the result of a lack of concentration.
2.4.3 Ignore Error Message Text
Occasionally, the compiler’s error messages are confusing and misleading. Therefore, I recommend to ignore message text and rather focus on the line number this
message refers to.
Précédent

- 29/185

Suivant