On Thu, 11 Mar 2004, Renchi Raju wrote:
> for eg:
>
> implicit real_kind(selected_real_kind(12,30))
>
> then all the literals/non-type-specificied reals and complexes(?) can be
> of the implicit kind specified. put it in the same place as an implicit
> statement or even allow it to be in a module and make everything accessing
> this module have the implicit type conversion.
>
> its not substantially different from passing a -r8 or -qautodbl=dbl4 as
> compiler flag, but it will easier to get a blessing from the fortran
> committee on the language end than on the compiler end.
-qautodbl and similar refer to both literals and variables. I don't like
them because they can lead to great inefficiency due to bad alignment
of reals and integers. On the other hand, I find it difficult to see
what problems can arise from such an implicit declaration referring to
_literals only_. It could be easily put in an INCLUDE and would
avoid having to add .d0 to each number in the program.
By the way, because of this, in my programs I use names for the most common
numbers, via an INCLUDE file where each is defined as a PARAMETER:
ONE = 1.d0, TWO=2.d0 (...up to TEN), PI=3.141592653589793238d0, HALF=0.5d0
etc. It reduces the size of effort required to add and remove .d0,
but of course it is not a real solution. I would really welcome any
simple facility which could help remove this problem
Alberto Fassò
|