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



Nestor Grion <ngrion@xxxxxxxxx> wrote:

> write(*,*) tf(transfer(a,0)), tf(transfer(b,0))

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. It might happen to work on a particular
collection of compilers; that might even happen to be most current ones
- I haven't checked. But I sure know that it isn't an assumption
justified by the standard.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.


Quantcast