Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site sdcsla.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcsla!west
From: west@sdcsla.UUCP (Larry West)
Newsgroups: net.lang.f77
Subject: Re: constant expressions in f77
Message-ID: <752@sdcsla.UUCP>
Date: Fri, 21-Dec-84 01:52:09 EST
Article-I.D.: sdcsla.752
Posted: Fri Dec 21 01:52:09 1984
Date-Received: Sun, 23-Dec-84 00:20:50 EST
References: <758@ttds.UUCP>
Reply-To: west@sdcsla.UUCP (Larry West)
Organization: UC San Diego: Institute for Cognitive Science
Lines: 32
Keywords: parameter statement constant expressions 4.2bsd
Summary: No problems with constant expression in "parameter" statement

In article <758@ttds.UUCP> sundman@ttds.UUCP (Bo Sundman) writes:
>I am trying to convert a large (30000 lines) fortran-77 program to
>UNIX environment. To start I have some problems about declarations:
>(1)     PARAMETER (K1=10,K2=2*K1) is not accepted.
>(2)     PARAMETER (KZ=2**K1)      is not accepted.
>(3)     CHARACTER LINE*(2*K1)     is not accepted.
>The error message from the compiler indicates that f77 do not
>accept these as contant expressions.
>It thus seems that constant expressions is very restricted. 
> {...}

Strange.   I tried the following file on both Sun and Vax, each
with (pretty much identical) 4.2bsd "f77".   As poor as that compiler
may be, the only complaint it gives me is:
	Warning on line 8 of foo.f: local variable line never used

Here's the file:
	PARAMETER ( FOO = 7 )
	parameter ( FOOD = FOO+5 )
	parameter ( K1 = 10, K2 = 2*K1 )
	parameter ( KZ = 2**K1 )
	character line*(2*K1)

	stop
	end
Can't imagine why your "f77" complains... what UNIX are you running?

-- 

--|  Larry West, UC San Diego, Institute for Cognitive Science
--|  UUCP:	{decvax!ucbvax,ihnp4}!sdcsvax!sdcsla!west
--|  ARPA:	west@NPRDC	{ NOT:  }