Closed edwardhartnett closed 8 months ago
@jbathegit and @jack-woollen any comments on this issue?
From a library design standpoint, the idea behind this separation was for encapsulation. In other words, each variable would only be defined and accessible to the functions, subroutines, or other modules which really needed it, rather than all such variables being part of one big module that would be globally accessible everywhere, and where it would therefore be a lot easier to, e.g., inadvertently clobber the value of some global variable in an unintended place.
However this is normally achieved with "USES ONLY" right? So no need to have many modules...
Yeah, now that you reminded me about that, the USE <module_name>, ONLY: <var_list>
option would probably work. Thanks, and I'll keep this on the "to do" list :-)
We have:
etc.
Seems like it would be natural to have one module, moda_vars, and have all the vars in the same module. This would reduce our module count quite a bit. Also subprograms would only have to have one use statement to get all the variables, instead of one use statement for each variable, as is currently the case.
This would also simplify the documentation, which currently has a module for each of these variables, which is a bit much.