Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!iuvax!pur-ee!j.cc.purdue.edu!ags From: ags@j.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.fortran Subject: Re: "Interesting" error interpretation by f77. Message-ID: <5307@j.cc.purdue.edu> Date: Wed, 23-Sep-87 10:57:14 EDT Article-I.D.: j.5307 Posted: Wed Sep 23 10:57:14 1987 Date-Received: Sat, 26-Sep-87 03:52:08 EDT References: <5117@jade.BERKELEY.EDU> <2577@aw.sei.cmu.edu> Reply-To: ags@j.cc.purdue.edu.UUCP (Dave Seaman) Organization: Purdue University Lines: 36 Keywords: FORTRAN parsing, error interpretation. In article <2577@aw.sei.cmu.edu> firth@bd.sei.cmu.edu.UUCP writes: > READ(*,*)NUM1,NUM2M=NUM1+NUM2 > >This MIGHT cause it to think READ was an array, since the line >now appears to be an assignment statement. > >However, does this really matter? A compiler whose error reporting >is this bad should not be lightly tossed aside - it should be thrown >with great force. I am curious to know what you think adequate error reporting should look like for this statement. I suppose you could try something like: Line 4: Unexpected characters on left hand side of assignment statement. The actual message, on the other hand, is almost as good: > Error on line 4 of practice.f: syntax error Knowing that there is a syntax error on line 4, anyone who knows FORTRAN should be able to look at the line and see what the error is. I suspect what you are complaining about is the presence of the warning messages: > Warning on line 9 of practice.f: local variable num2 never used > Warning on line 9 of practice.f: local variable read never used Would you consider the compiler's error reporting to be "improved" if these warning messages had been suppressed? Why? Do you object to both warnings, or only the one that mentions the variable "read"? Why? -- Dave Seaman ags@j.cc.purdue.edu