Abstract
This chapter discusses the software engineering in MODULA-2. MODULA-2 supports the ideas of procedural decomposition, scope rules at procedure level, and strong type checking. It also provides facilities for trying to overcome many of the problems arising from conflicts between visibility/existence in scope rules, higher level abstractions, and separate compilation of large programs. The solutions rely on different aspects of the use of a variation on block structuring known as the MODULE. At first glance a local module resembles a parameterless procedure indeed, like procedures, and modules in MODULA-2 may be nested within one another, and within procedures, although this is not exploited very often. The visibility and existence rules for scope are very different. It is found that of the identifiers declared outside a MODULE, only those that are explicitly mentioned in an IMPORT list can be seen inside the MODULE, while the identifiers declared inside a MODULE at its highest level have a scope that extends outside of the MODULE, provided they are explicitly mentioned in its EXPORT list.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.