I am not well versed in Fortran, but am trying to understand a Fortran function and how it is passing a parameter to a subroutine (so that I can code similar functionality, in C#). It happens to be SMOOTH from Carl de Boor's "A Practical Guide to Splines," but I'm simplifying for the sake of my question.
The function SMOOTH begins with something like this:
real function SMOOTH (x, y, dy, n, s, V, A)
integer n, i, m
real A(n, 4), dy(n), s, V(n, 7), x(n), y(n)
call SETUPQ(x, dy, y, n, V, A(1, 4))
...
My understanding is that A and V are multi-dimensional arrays, with n rows each, and 4 and 7 columns, respectively. It appears that row 1, column 4 of A is being passed as the last parameter (A(1, 4)) in the call SETUPQ line.
The subroutine SETUPQ starts like this:
subroutine SETUPQ (x, dy, y, n, V, QTY)
integer n, i, m
real dy(n), QTY(n), V(n, 7), x(n), y(n)
...
Within SETUPQ, assignment is later made to the n elements of the QTY array.
My question is, why is A(1, 4) from SMOOTH being passed into QTY of SETUPQ? Isn't A(1, 4) simply a single value from A? Is QTY going to be assigned to A(1, 4)?
I'd appreciate any help toward understanding what is happening with that call SETUPQ... line.