Re: Common variable....help me



In article <1135990020.933961.19980@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
kithsiri@xxxxxxxxx wrote:

Here is another possible error in your code:

> Double precision, parameter ::
> omega=(2*3.14159265358979/23.93446959/3600)

The omega variable is indeed double precision, but it is initialized
with a single precision expression, so you may not be getting the
precision that you think you are.

Since you are using f90+ syntax anyway, I would recommend that you:

1) use 'implicit none' everywhere.

2) get rid of common and use module variables instead.

3) get rid of 'include' and just use the modules.

4) get rid of 'double precision' and use the appropriate kind
parameters (not hardwired constants) in your declarations and in
your constant variables.


You don't have to do everything at once, and if this is a large
project with other programmers you may have other compatibility
issues to consider, but the above will let the compiler help debug
the code for you rather than you having to do it all manually
yourself.

$.02 -Ron Shepard
.