Locales in C effect read in Fortran
Janne Blomqvist
blomqvist.janne@gmail.com
Wed Dec 23 11:20:00 GMT 2015
On Wed, Dec 23, 2015 at 12:34 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Wed, Dec 23, 2015 at 2:23 AM, Dirk Spelsberg <dsp@chemie.uni-kl.de> wrote:
>> It took me quite a while to sort this out. The program attached works with
>> English locales but not with German ones. Apparently the decimal point is
>> replaced by a decimal comma somewhere during the read.
>
> I don't think this is a bug as your locale says the decimal separator
> is a comma.
> This is also true when using scanf too.
It's a bug as the Fortran standard has no concept of locales, and
explicitly says that the decimal separator is ".", unless one uses the
decimal='comma' (or however it was spelled?) I/O specifier. But
anyway, as I mentioned to the OP, this issue is fixed as of GCC 5.
--
Janne Blomqvist
More information about the Fortran
mailing list