Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Neil Storer (Neil.Storer_at_[hidden])
Date: 2005-10-12 03:42:19


Toon Knapen wrote:

>Fortran LOGICAL
>
>
>
>could you elaborate?
>
Toon,

There is no universally-agreed Fortran convention for how .TRUE. and
.FALSE. boolean values are represented and how a value is checked for
.TRUE. and .FALSE.

Some Fortran implementations use 0 for .FALSE. and 1 for .TRUE. (they
may test for .TRUE. as being NON-ZERO)
Some Fortran implementations use 0 for .FALSE. and -1 for .TRUE. (they
may test for .TRUE. as being NEGATIVE)
Some Fortran implementations use -1 for .FALSE. and +1 for .TRUE. (they
may test for POSITIVE .TRUE. and NEGATIVE .FALSE.)

Checkout the PGI and ABSOFT Fortran compilers for example.

Regards
       Neil

-- 
+-----------------+---------------------------------+------------------+
| Neil Storer     |    Head: Systems S/W Section    | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF,          | email: neil.storer_at_[hidden]    |    //=\\  //=\\  |
| Shinfield Park, | Tel:   (+44 118) 9499353        |   //   \\//   \\ |
| Reading,        |        (+44 118) 9499000 x 2353 | ECMWF            |
| Berkshire,      | Fax:   (+44 118) 9869450        | ECMWF            |
| RG2 9AX,        |                                 |   \\   //\\   // |
| UK              | URL:   http://www.ecmwf.int/    |    \\=//  \\=//  |
+--+--------------+---------------------------------+----------------+-+
   | ECMWF is the European Centre for Medium-Range Weather Forecasts |
   +-----------------------------------------------------------------+