Since Fortran pointers
Since Fortran pointers/allocatables contain information about the upper and lower limits of indices, I mainly use them to obtain summation indices. Thus if I pass a pointer, it may look like...
View ArticleQuote:Dino R. wrote:
Quote:Dino R. wrote:Ah, thanks a lot. This is kind of obvious, but I'm still surprised that the default behavior is to start all indices from 1.To do otherwise puts a big burden on the compiler that is...
View ArticleAnd Steve could have added
And Steve could have added that arrays can be declared:real :: foo(-123:456)Jim Dempsey
View ArticleIt's because you can point to
It's because you can point to an array section, including a discontiguous section. What other choice could be made there? The same rule applies to passing an array to a deferred-shape array dummy...
View ArticleAh, thanks a lot. This is
Ah, thanks a lot. This is kind of obvious, but I'm still surprised that the default behavior is to start all indices from 1.
View ArticleDino,
Dino,Here is an additional example: recursive subroutine CopyToYMM_1D(f, t, s) use MOD_ALL real, pointer :: f(:) type(TypeYMM), pointer :: t(:) integer :: s integer :: i real,...
View ArticleIf you want b to point to a
If you want b to point to a(ilower:iupper) such that the bounds of b also run from ilower to iupper, the statement you want isb(ilower:)=>a(ilower:iupper)This form of pointer was not a part of...
View ArticleSince Fortran pointers
Since Fortran pointers/allocatables contain information about the upper and lower limits of indices, I mainly use them to obtain summation indices. Thus if I pass a pointer, it may look like...
View ArticleQuote:Dino R. wrote:
Quote:Dino R. wrote: Ah, thanks a lot. This is kind of obvious, but I'm still surprised that the default behavior is to start all indices from 1.To do otherwise puts a big burden on the compiler that...
View ArticleAnd Steve could have added
And Steve could have added that arrays can be declared:real :: foo(-123:456)Jim Dempsey
View ArticleIt's because you can point to
It's because you can point to an array section, including a discontiguous section. What other choice could be made there? The same rule applies to passing an array to a deferred-shape array dummy...
View ArticleAh, thanks a lot. This is
Ah, thanks a lot. This is kind of obvious, but I'm still surprised that the default behavior is to start all indices from 1.
View ArticleDino,
Dino,Here is an additional example: recursive subroutine CopyToYMM_1D(f, t, s) use MOD_ALL real, pointer :: f(:) type(TypeYMM), pointer :: t(:) integer :: s integer :: i real,...
View ArticleIf you want b to point to a
If you want b to point to a(ilower:iupper) such that the bounds of b also run from ilower to iupper, the statement you want isb(ilower:)=>a(ilower:iupper)This form of pointer was not a part of...
View Article