Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!PT!sei!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.lang.fortran Subject: Re: "Interesting" error interpretation by f77. Message-ID: <2577@aw.sei.cmu.edu> Date: Tue, 22-Sep-87 09:13:25 EDT Article-I.D.: aw.2577 Posted: Tue Sep 22 09:13:25 1987 Date-Received: Thu, 24-Sep-87 05:56:48 EDT References: <5117@jade.BERKELEY.EDU> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE) Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 30 Keywords: FORTRAN parsing, error interpretation. In article <5117@jade.BERKELEY.EDU> lagache@violet.berkeley.edu (Edouard Lagache) writes: PROGRAM PRACT REAL NUM1,NUM2,SUM WRITE(*,*) 'Enter two numbers to be added to each other:' READ(*,*) NUM1, NUM2 SUM = NUM1 + NUM2 WRITE(*,*) WRITE(*,*) 'The sum of the two numbers is : ',SUM STOP END %f77 practice.f practice.f: MAIN pract: Error on line 4 of practice.f: syntax error Warning on line 9 of practice.f: local variable num2 never used Warning on line 9 of practice.f: local variable read never used Could the problem be that the 'U' on line 5 is interpreted as a continuation symbol? Hence the compiler thinks line 4 reads 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.