Pierre Hugonnet writes:
> That's why I say that SELECTED_REAL_KIND doesn't bring any advantage
******^^^*******
> in terms of portability: if you want to be portable, you are
> forced to use REAL and DOUBLE PRECISION.
It seems quite a large stretch to go from "SELECTED_REAL_KIND doesn't
solve this particular problem" to "SELECTED_REAL_KIND doesn't bring
any advantage in terms of portability." Perhaps you meant that it
doesn't bring any advantage in this particular scenario or application.
I have numerous applications that used to require considerable pain
to port between 32-bit and 64-bit environments in the f77 days. The
only way to do it was to use some form of pre-processor on the Fortran
source to change between single and double precision. Some compilers
had special switches to facilitate such porting, but many did not,
so depending on the compiler switches was not an option. (And not
all the relevant machines had any preprocessors available, so I
had my own trivial one written in Fortran and special-cased to the
coding conventions I used to make the task simpler).
F90-revised versions of those same codes now compile and work as desired
on both 32-bit and 64-bit architectures without any code changes at
all, thanks to SELECTED_REAL_KIND.
SELECTED_REAL_KIND has certainly been a *MAJOR* advantage in
portability for those codes. And I know of other users with simillar
experiences. True, my codes didn't involve generics at all, but I
don't think that automatically classifies my codes as completely
useless.
I would not argue that SELECTED_REAL_KIND is a panacea for all
problems in all situations. Some posts here have pointed out areas
of difficulty. Nor would I argue that it is necessarily the best
possible approach or that improvements are not possible (if you
can follow my double negatives).
But to argue that it "doesn't bring *ANY* advantage" is taking a
pretty narrow viewpoint in light of the many codes where it has
demonstrated considerable advantage.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|