Is it possible in Fortran to have a pointer that, depending on circumstances, points to an array with a different rank?
Asked
Active
Viewed 35 times
1
-
1I don't think so. – chw21 May 22 '20 at 00:42
-
If the example of _pointer bounds remapping_ isn't what you are after then please provide more detail on what you are after. – francescalus May 22 '20 at 03:08
-
I basically want to use a pointer that can point to different ranked arrays and have different ranked inputs in different parts of the code. It looks like that's not possible. – Imaginary May 22 '20 at 22:53
-
1Yes, the pointer will have the rank it was declared with. It may point to things of different rank but it won't change its own rank. – francescalus May 23 '20 at 19:46