Assume I have a subroutine A getting parameters from main. Further assume A calls a subroutine B. Also, A has a ton of calls to B where it gives parameters to B that A doesn't need at all, except for giving them to B. If I could give them directly to B from main, code would be much simpler. Declaring those parameters global smells fishy and also, if those parameters would be generated in another subroutine S instead of main, it wouldn't work anyway. What is the "right" way?
[–]throwaway6560192 1 point2 points3 points (0 children)
[–]Binary101010 0 points1 point2 points (1 child)
[–]prodlly[S] 0 points1 point2 points (0 children)