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



In article <1133253978.442583.140800@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"David Flower" <DavJFlower@xxxxxxx> wrote:

> INTEGER I
> DO I = 0, 2

When I mentioned using logical variables as do-loop variables and
array indices, I meant something more like

logical :: i
integer :: array(.false.,.true.)
do i = .false, .true. ! or 0,1 or whatever.
j = array(i) ! arbitrary expression
...

You can write code that looks sort of like this now, but you have to
define your own integer TRUE and FALSE values, along with the
appropriate integer<-->logical mapping functions. It just seems
like it would have simplified a lot of code to have standardized
this back in 1977.

$.02 -Ron Shepard
.


Quantcast