|
|
 |
| found 36 articles for 0.000 sec |
  |
Group: comp.lang.fortran · Group Profile · Search for Ivec in comp.lang.fortran
Author: Dick Hendrickson
Date: Apr 24, 2007 11:53
... could define a function function slice(ivec,i1,i2) result(jvec) ! return the ... ! array access integer, intent(in) :: ivec(:) integer, intent(in) :: i1,i2 ... of an assumed shape array, like IVEC(:), is always 1. So, if f(...side. Dick Hendrickson j2 = min(ubound(ivec,dim=1),i2) nj = j2 - ... be sure. allocate (jvec(nj)) jvec = ivec(j1:j2) end function slice ...
|
| Show full article (2.46Kb) |
Group: comp.lang.fortran · Group Profile · Search for Ivec in comp.lang.fortran
Author: Beliavsky
Date: Apr 24, 2007 11:32
...expression one could define a function function slice(ivec,i1,i2) result(jvec) ! return the slice ivec...of-bounds ! array access integer, intent(in) :: ivec(:) integer, intent(in) :: i1,i2 integer, allocatable ...integer :: j1,j2,nj j1 = max(lbound(ivec,dim=1),i1) j2 = min(ubound(ivec,dim...- j1 + 1 allocate (jvec(nj)) jvec = ivec(j1:j2) end function slice and write slice...
|
| Show full article (1.89Kb) · Show article thread |
Group: comp.lang.fortran · Group Profile · Search for Ivec in comp.lang.fortran
Author: Beliavsky
Date: Mar 31, 2007 06:05
... :: n = 3 integer :: i,ivec(n) ivec = 1 do i=n,n...ivec(1:n-1) + ivec(1:i) end do end program xsum_nonconform ... :: n = 3 integer :: i,ivec(n) ivec = 1 i = n print*,ivec(1:n-1) + ivec(1:i) end program xsum_nonconform_simple the compilers behave...ivec(1:n-1) + ivec(1:n) end program xxnonconform gives a compile... saying xxnonconform.f90:5.7-25: print*,ivec(1:n-1) ...
|
| Show full article (1.34Kb) |
|
 |
|
1 ·
2 ·
3 ·
4 ·
next |
|
|