[MPI3 Fortran] Fwd: [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Malcolm Cohen
malcolm at nag-j.co.jp
Fri Mar 1 03:06:50 CST 2013
Bill Long writes:
>The value of C_BOOL as a Fortran KIND type for LOGICAL is such that
>
>1) The bitsize of LOGICAL(C_BOOL) matches the bitsize of _Bool in C for the
>companion processor.
>
>2) The Fortran processor uses the internal bit pattern in LOGICAL (C_BOOL) of 0
>to represent false, and 1 to represent true.
Nick Maclaren asks:
>Does it? I can't find that in the Fortran standard. Either I have
>missed it, or this is a wart that we should consider for the next
>revision.
I think this is inherent in the meaning of the word "interoperable": if the
internal representation is different, it cannot interoperate (though we fudged
that with unsigned...). This could be clarified editorially in the next
revision.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the mpiwg-fortran
mailing list