Error messages in F, take two

DAVID A. EPSTEIN · ACM SIGPLAN Fortran Forum · 1997

THE ,SET-UPThis is the second of two articles about the error messages in the F compilers.The first (Fortran Forum, Aug 1996, p. 15) explained how F handles a misspelling of the word integer.As a freshman, I had punched i ntge r i into a card, and it took me a frustrating twenty four hours to figure out what I had done wrong.In this article, instead of declaring :success against the off-by-one syntax error, I describe this month's humbling experience--a test case that leads to the dreaded uninformative message "syntax error" in today's F compilers.With many hundreds of specific error messages designed to tell the student exactly what to change for a successful compilation, Imagine1 has been quite pleased with the results reported from colleges teaching with the F programming language compilers.My confidence that no student ever needs to suffer through the painful deciphering of a vague error message like "syntax error" was partially shattered, however, in a recent report from Bob Hancock from Orange ,Coast College:... Syntax errors are identified, pointed to, and usually explained correctly.There is still the good old "Syntax Error" --b u t at least it is pointing to the wayward line."(For the entire report, see ) This I found hard to believe.I had never come across "syntax error" while testing F code, and I had found it extremely difficult to construct a test case that results in such a message.I knew that it was possible to produce "syntax error."Some scenarios in the compiler are so intricate that any concise error report would be misleading in some cases.But I had assumed that these few cases were not likely to surface.

Read the paper · More papers on PaperTik