I want to pass a real array to a subroutine. The array is a real array with a lower bound of 0.1 and an upper bound of 1.0
real, dimension(10) :: r = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]
The array is passed successfully with the way of explicit shape dummy array. Now I want to change the increment or step size in the array as
real, dimension(10) :: r = [0.10,0.11,0.12,0.13,0.14...,1.0]
Ideally, the increment should be small enough. Therefore, I do not see the option of passing the array explicitly. The other way apparently is using an assumed shape dummy array and I have seen that it would need an explicit interface.
But the original problem remains the same as how to create that type of array before passing to the procedure. I have seen few ways of using the do loop Fortran DO loop, warning to use integer only , Fortran: do-loop with real-type argument. It seems to me that they are just creating the incrementation and not creating any array.
So how to create an array with 0.1 lower bound, 1.0 upper bound, and increment e.g. 0.01? Or each incremental value should be passed to the procedure by following the mentioned references? What is the way? I hope it could be asked on this forum but somehow I could not figured it out.