🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.f77
Article #388

Re: possible implied-do bug?

#388
From: Andrew Koenig
Date: Wed, 25 Jun 1986 12:46
28 lines
1320 bytes
> 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?
Technical Details
Message-ID: <5703@alice.uUCp>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark
References: <1452@alvin.mcnc.UUCP>

Show Full Headers
Complete Article Headers
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: arc1-ca.pugleaf.net!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