Why would you want to make x1 a parameter?
For whatever you want to do in your program
real*8 x1
...
x1 = (8/9)**0.5
will do the same job.
'paramater' means that (1) you cannot edit this variable in your code and (2) variable name and variable value are equivalent to each other. As far as I know, the compiler would include the value into the executable whenever the name is referenced.
The usage - at least the only real sensible usage - is to name paramters to control certain features of your prog.
Example:
Say, the user shall be able to select the language of the message prompts. so You will have a variable iLanguage that may show the values as follows
iLanguage = 1 means English
iLanguage = 2 means French
iLanguage = 3 means German
iLanguage = 4 means Italian
...
...
In your code you will have to do the selection like
Code:
select case (iLanguage)
case (1)
output in English
case (2)
output in French
....
....
end select
but if you use parameters, then you could have it like this
Code:
integer, parameter :: iEnglish = 1
integer, parameter :: iFrench = 2
integer, parameter :: iGerman = 3
...
... (customer to select language)
...
select case (iLanguage)
case (iEnglish)
output in English
case (iFrench)
output in French
...
...
(end select)
So while coding or debugging you do not have to memorize which value indicates which language.
I do not know of any other sensible way to use parameters.
Norbert
The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.