Statement Type:

The PARAMETER statement is a non-executable assignment statement It may also be used as an attribute in a data type statement (REAL, INTEGER, CHARACTER,...)

Statement Purpose:

The parameter statement's primary purpose is to define constants that will be used repeatedly within a program. Remember that variables that are assigned values with a PARAMETER statement can not have their values changed later on in the program.


As a basic statement it can be used to assign values to one or more parameters.
		parameter (c=3.0e8)
		parameter (c=3.0e8,ymod=29.0e3,h=6.02e23)
It can also be used as an Attribute to simultaneously declare a parameter's type and value.
		real, parameter :: c = 3.0e8
		integer, Parameter :: lmax = 150, jmax = 20

Related Topics and Lectures:

data statement

lecture six

Up one level / Home

Written by Jason Wehr and Maintained by John Mahaffy :