Article View: net.lang.f77
Article #308Re: Question on "Parameter" statement
From: der Mouse
Date: Thu, 30 Jan 1986 11:05
Date: Thu, 30 Jan 1986 11:05
29 lines
1756 bytes
1756 bytes
> The following construction doesn't work (compile-time error) in either
> ULTRIX f77 or VMS Fortran (on a Microvax). Should it work? Does it
> work on any machine/compiler you know of? Does the f77 standard say
> anything about this?
> PARAMETER ( Size = 10 )
> CHARACTER * Size string
> Peter S. Shenkin, Dept. of Biol. Sci., Columbia Univ., NY, NY
> {philabs,rna}!cubsvax!peters cubsvax!peters@columbia.ARPA
As I recall VMS FORTRAN (it's been a looong time), this would work
if you wrote it
PARAMETER size = 10
CHARACTER * (size) string
I think you could put the parens in the PARAMETER statement with no ill
effects, but the parens around the "size" after the star are necessary
when the value there is a compile-time constant expression but not a
plain constant.
--
der Mouse
USA: {ihnp4,decvax,akgua,etc}!utcsri!mcgill-vision!mouse
philabs!micomvax!musocs!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
mcvax!seismo!cmcl2!philabs!micomvax!musocs!mcgill-vision!mouse
Hacker: One who accidentally destroys /
Wizard: One who recovers it afterward
Technical Details
Message-ID:
<362@mcgill-vision.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!linus!philabs!micomvax!musocs!mcgill-vision!mouseReferences:
<410@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 mcgill-vision.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!linus!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: net.lang.f77 Subject: Re: Question on "Parameter" statement Message-ID: <362@mcgill-vision.UUCP> Date: Thu, 30-Jan-86 06:05:02 EST Article-I.D.: mcgill-v.362 Posted: Thu Jan 30 06:05:02 1986 Date-Received: Sat, 1-Feb-86 20:18:51 EST References: <410@cubsvax.UUCP> Organization: McGill University, Montreal Lines: 29