It's unclear to me exactly what the Fortran language passes from a calling routine to a called routine when the calling variables are arrays, and the calling and called variable types do not match!
My confusion relates to exactly what is being received by the called routine - array elements (element values), memory references to the element values, entire arrays, etc... I haven't been able to identify the rules used. Perhaps there are subtle rules at play here.
Four specific examples demonstrate my areas of confusion, and I'm hoping someone can clarify the rules for me please (the examples are drawn from a working Fortran program, where the calling and called variables are exactly in the forms shown below):
1. calling: A(1:,1) 2-dimensional array passed to
1. called: B 1-dimensional array
2. calling: C(1) 1-dimensional array passed to
2. called: D integer
3. calling: E(1:,var1) 2-dimensional array passed to
3. called: F 1-dimensional array
4. calling: G(var2) 1-dimensional array passed to
4. called: H integer
Any clarification of the data received by the called routines in the four examples will be greatly appreciated.
My confusion relates to exactly what is being received by the called routine - array elements (element values), memory references to the element values, entire arrays, etc... I haven't been able to identify the rules used. Perhaps there are subtle rules at play here.
Four specific examples demonstrate my areas of confusion, and I'm hoping someone can clarify the rules for me please (the examples are drawn from a working Fortran program, where the calling and called variables are exactly in the forms shown below):
1. calling: A(1:,1) 2-dimensional array passed to
1. called: B 1-dimensional array
2. calling: C(1) 1-dimensional array passed to
2. called: D integer
3. calling: E(1:,var1) 2-dimensional array passed to
3. called: F 1-dimensional array
4. calling: G(var2) 1-dimensional array passed to
4. called: H integer
Any clarification of the data received by the called routines in the four examples will be greatly appreciated.