Re: MODULEand USE versus Argument Passing
- From: Richard Edgar <rge21@xxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:56:56 +0200
E. Robert Tisdale wrote:
Global variables are *always* a bad idea. Never pass function arguments through modules or common storage.
<snip>
If your subprogram has more than a few arguments, you probably have a design problem.
*Never* using global variables sounds like a good way to end up with very lengthy argument lists. For example, I'd probably prefer to put physical constants in a MODULE, and USE it when necessary, rather than pass them all as arguments when ever a procedure (or one of its child procedures) might need them.
For the particular problem presented, I would agree that arguments are the way to go. But your first sentence is far too sweeping.
Richard .
- References:
- MODULEand USE versus Argument Passing
- From: Herman D . Knoble
- Re: MODULEand USE versus Argument Passing
- From: E. Robert Tisdale
- MODULEand USE versus Argument Passing
- Prev by Date: Re: moduel VS parameters
- Next by Date: Re: backslash-issues
- Previous by thread: Re: MODULEand USE versus Argument Passing
- Next by thread: Re: MODULEand USE versus Argument Passing
- Index(es):
Relevant Pages
|