Logical Datatype in Fortran

Has there been any effort put in to looking at supporting LOGICAL data
type in Fortran? It seems that the ISO standard doesn't say anything
about the internal representation of a LOGICAL. Are there any compilers
that do not store the data of a LOGICAL*4 as 0 for false and non-zero
for frue?

On Linux with Intel compilers, logical data seems to be -1 (all ones)
for true and 0 (all zeros) for false.

David McCloskey

Engineer

Software Products

Westinghouse Electric Company

Energy Center, East 479G

Monroeville, PA, 15146, USA

Phone: +1 (412) 374-3789

Email: mcclosdl@westinghouse.com

Home Page: www.westinghousenuclear.com

Hi David,

Has there been any effort put in to looking at supporting LOGICAL data type in Fortran? It seems that the ISO standard doesn't say anything about the internal representation of a LOGICAL. Are there any compilers that do not store the data of a LOGICAL*4 as 0 for false and non-zero for frue?

  We've talked about it, and the new "bool" type for C99. It would be nice to support, but we'll have to prioritize it internally against other bugs/features, unless someone would like to fund the work (or contribute a patch :-).

  Quincey

···

On Apr 11, 2008, at 8:57 AM, McCloskey, David L. wrote:

On Linux with Intel compilers, logical data seems to be -1 (all ones) for true and 0 (all zeros) for false.

David McCloskey
Engineer
Software Products

Westinghouse Electric Company
Energy Center, East 479G
Monroeville, PA, 15146, USA
Phone: +1 (412) 374-3789
Email: mcclosdl@westinghouse.com
Home Page: www.westinghousenuclear.com

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.