- #1
nguyenthanhlam
- 9
- 0
Hi all,
Suppose I declare X in the main program.
Then in the following subroutine:
Call example(list of arguments)
------------------------------------
subroutine example(list of arguments)
x=y+z
end subroutine
-------------------------------------
I have two options:
(a) including X in the list of argument, then I have to declare X within the subroutine.
(b) not including X in the list of argument, then I do not have to declare X within the subroutine.
I don't know the advantages of one over the other.
Which method should I use?
Thanks,
Lam
Suppose I declare X in the main program.
Then in the following subroutine:
Call example(list of arguments)
------------------------------------
subroutine example(list of arguments)
x=y+z
end subroutine
-------------------------------------
I have two options:
(a) including X in the list of argument, then I have to declare X within the subroutine.
(b) not including X in the list of argument, then I do not have to declare X within the subroutine.
I don't know the advantages of one over the other.
Which method should I use?
Thanks,
Lam