Re: printing logical variables as "true" and "false"



In article <1h6r61b.1dl9q5f1btrvlsN%nospam@xxxxxxxxxxxxx>,
nospam@xxxxxxxxxxxxx (Richard Maine) wrote:

> You appear to be assuming things that the standard quite explicitly does
> not guarantee. Specifically, you appear to be assuming that the
> compiler's internal representation of .true. and .false. are the same as
> the internal representations of the integers 0 and 1. This is *NOT* a
> standard-conforming assumption and there have been plenty of compilers
> where it was not the case.

However, in hindsight things would sure have been easier over the
past 25 years if the standard did specify this kind of mapping. Or
if LOGICAL were treated as a 2-value subset of INTEGER. That way,
you could use logical variables as, for example, array indices,
do-loop indices, and so on.

$.02 -Ron Shepard
.


Quantcast