Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site angband.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!gymble!lll-crg!dual!mordor!angband!sjc
From: sjc@angband.UUCP (Steve Correll)
Newsgroups: net.lang.f77
Subject: Re: Adjustable Arrays
Message-ID: <50@angband.UUCP>
Date: Sat, 9-Mar-85 21:15:20 EST
Article-I.D.: angband.50
Posted: Sat Mar  9 21:15:20 1985
Date-Received: Tue, 12-Mar-85 20:15:12 EST
References: <1386@hao.UUCP>
Distribution: net
Organization: S-1 Project, LLNL
Lines: 16

>       subroutine sub(buf,nbuf)
>       dimension nbuf(5)
>       dimension buf(nbuf(2),nbuf(3))
>       write(6,*) buf
>       return
>       end
>
> Second question: is this even legal according to the standard?

It may be illegal. Section 5.1.1.1, "Form of a Dimension Declarator",
page 5-2 of ANSI X3.9-1978 says: "A dimension bound expression must not
contain a function or array element reference." Of course, one would hope
the compiler would complain rather than emitting bad code.
-- 
                                                           --Steve Correll
sjc@s1-b.ARPA, ...!decvax!decwrl!mordor!sjc, or ...!ucbvax!dual!mordor!sjc