[MPI3 Fortran] Fwd: [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Craig Rasmussen
rasmus at cas.uoregon.edu
Thu Feb 28 14:03:56 CST 2013
On Feb 28, 2013, at 11:47 AM, N.M. Maclaren wrote:
> On Feb 28 2013, Craig Rasmussen wrote:
>>> (3) Or one forces the compiler to accept also other values than .true./.false. As with the previous item, it will affect also all non-Bind(C) logicals. And C_Bool should presumably excluded as one otherwise might get in trouble with the C compiler.
>>
>> It seems it has to anyway to be compatible with C. I don't have the C99 standard but it appears that there isn't a constant for "true" and "false" without including stdbool.h. Thus a Fortran compiler will have to anticipate values other than .true./.false.
>
> true and false are specified to be 1 and zero in stdbool.h.
>
While Fortran can't rely on programmers including stdbool.h, these are at least well-defined values.
-craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20130228/73f43cd7/attachment-0001.html>
More information about the mpiwg-fortran
mailing list