- #1
VasanthG
- 13
- 0
I have one main program where I have calculated some array, say A(i,j)
If I want ot use the values in subroutine, and calculate some more values and give back the result to main program, how my syntax should be?
I tried this way. Its not working.
program a
......
call sub(A,B,C)
end program a
subroutine (X,Y,Z)
allocated memory same as A,B,C to X,Y,Z
some formulae
return
end subroutine sub
Thank you.
If I want ot use the values in subroutine, and calculate some more values and give back the result to main program, how my syntax should be?
I tried this way. Its not working.
program a
......
call sub(A,B,C)
end program a
subroutine (X,Y,Z)
allocated memory same as A,B,C to X,Y,Z
some formulae
return
end subroutine sub
Thank you.