[MPI3 Fortran] [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind

N.M. Maclaren nmm1 at cam.ac.uk
Tue Feb 26 18:05:51 CST 2013


On Feb 26 2013, Craig Rasmussen wrote:
>
> I don't know what Bill will think of this but I think the problem should 
> be resolved in the Fortran standard in the end so that
>
>      LOGICAL(C_INT)
>
> is a legal type. This would allow mapping Fortran logical variables to C 
> integers which is the type most C programmers use for logical variables 
> anyway.

An interesting thought - a VERY interesting thought!  The name C_INT
wouldn't do, because kinds are specific to a type, but that's a detail.
I can't think of any reason that it wouldn't work.

> Does anyone know what size a default logical is in existing compilers? I 
> assume it is the same size as a default integer.

It had better be - that's required by the standard, and has been since
Fortran II.


Regards,
Nick Maclaren.




More information about the mpiwg-fortran mailing list