Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Thu, 28 Dec 2006 08:33:00 -0500
"David Frank" <dave_frank@xxxxxxxxxxx> wrote in message
news:4593856f$0$32092$ec3e2dad@xxxxxxxxxxxxxxxxxxxxxxxxx
The compiler says its NOT an array, and of course its RIGHT!
My statement above being wrong, I investigated various things using CVF
after finding that COUNT intrinsic is unacceptable declaring a subroutine's
auto-size arg.
Below is the closest I could come to syntax that might adapt to your
problem..
module test_1
contains
pure integer function mycount(k)
logical,intent(in) :: k(:)
mycount = count(k) * 2 ! ok to use count intrinsic here
end function
subroutine messy(k,n)
logical :: k(:)
integer :: n
real :: lambda(mycount(k))
n = size(lambda)
end subroutine
end module test_1
program test
use test_1
implicit none
logical :: k(2) = .true.
integer :: size_lambda
call messy( k, size_lambda)
write (*,*) size_lambda ! = 4
end program
.
- References:
- Dimension attribute based on host-associated variable - bug in Intel Fortran
- From: Rich Townsend
- Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- From: David Frank
- Dimension attribute based on host-associated variable - bug in Intel Fortran
- Prev by Date: Re: Write A, left justified, howto?
- Next by Date: Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Previous by thread: Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Next by thread: Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Index(es):
Relevant Pages
|
|