Okay, I think I'm about to get a grip of the situation.
Smart module solution, by the way, but not really useful in my situation (unless it's possible to make kind of an "object module"... hmm... I could maybe make a new datatype containing both the array and the index information, although I'm...
So, to summarize: One can "cheat" and use either ALLOCATABLE or POINTER arrays to pass indexing information to the subroutine, but at the "cost" of having to explicitly specify (both in subroutine and main program) that the array is ALLOCATABLE/POINTER? (Making the subroutine less flexible)
But...
Hi,
I'm using (and at the same time trying to master) Fortran 95...
Okay, suppose that I have an array,
INTEGER, DIMENSION(-5:5) :: arr
and I want to pass this to a subroutine WHILE keeping the "non-default" indexing (because the indexing contains important information). The ususal...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.