🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.f77
Article #306

Re: Question on "Parameter" statement; and a new question!

#306
From: Andrew Koenig
Date: Thu, 30 Jan 1986 21:14
23 lines
1542 bytes
> OK, so I tried it the way you wrote it.  Now it runs just fine under VMS,
> but under ULTRIX (presumably the 4.2bsd f77 compiler) it bombs out, but
> only because it thinks "size" is a REAL;  "isize" works just fine.  So a
> new question:  I always thought PARAMETER definitions were not subject to
> the IMPLICIT rules;  VMS Fortran behaves according to my preconception, at 
> least in this example.  So am I wrong, or is this YAf77B* ?

The type of an identifier defined in a PARAMETER statement is determined
in exactly the same way as the type of any other identifier.  From
the Standard, page 8-8, lined 53ff:

	If a symbolic name of a constant is not of default
	implied type, its type must be specified by a type-statement
	or IMPLICIT statement prior to its first appearance in a
	PARAMETER statement.

Thus, you should have written:

	integer size
	parameter (size = 10)
	character * (size) string

(Sorry I neglected this on my previous posting.)
Technical Details
Message-ID: <4909@alice.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark
References: <413@cubsvax.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: Question on "Parameter" statement;  and a new question!
Message-ID: <4909@alice.UUCP>
Date: Thu, 30-Jan-86 16:14:41 EST
Article-I.D.: alice.4909
Posted: Thu Jan 30 16:14:41 1986
Date-Received: Sat, 1-Feb-86 03:56:05 EST
References: <413@cubsvax.UUCP>
Organization: Bell Labs, Murray Hill
Lines: 23