Re: Trying to use a logical as an array index
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Trying to use a logical as an array index         

Group: comp.lang.fortran · Group Profile
Author: Al Greynolds
Date: Jul 10, 2008 12:05

On Jul 10, 7:42 am, ferrad hotmail.com> wrote:
>   write(6,*) iii, e_truth(iii)
>
>   end

One simple (and portable) way is:

e_truth(count((/truth/)))

or a slightly more readable Fortran-200x version:

e_truth(count([truth]))

Al Greynolds
www.ruda.com
no comments
diggit! del.icio.us! reddit!