Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.f77 Subject: Re: possible implied-do bug? Message-ID: <5703@alice.uUCp> Date: Wed, 25-Jun-86 08:46:40 EDT Article-I.D.: alice.5703 Posted: Wed Jun 25 08:46:40 1986 Date-Received: Thu, 26-Jun-86 04:28:00 EDT References: <1452@alvin.mcnc.UUCP> Organization: Bell Labs, Murray Hill Lines: 28 > The following program compiles under VMS fortran, but not > f77: > > dimension l(10),m(10),n(10) > write (*, * ) i,((l(k), m(k), n (k)), k=1,10) > end > > This version works: > > dimension l(10),m(10),n(10) > write (*, * ) i,(l(k), m(k), n (k), k=1,10) > end > > The extra parenthesis around the items in the implied do list > appears to be causing trouble. Is this a bug, or is the compiler > in compliance with the standard? > > Thanks. The compiler is in compliance with the standard. The list of expressions in an implied DO must not be parenthesized. Otherwise there would be an ambiguity: write (*,*) ((3.0,4.0), k = 1, n) Does this print ten alternating repetitions of 3.0 and 4.0, or is (3.0,4.0) a complex constant?