=== Module Definitions A *module definition* provides a named scope that encloses and qualifies other definitions, including other module definitions. It is similar to a namespace in C++ or a package in Java or Scala. ==== Syntax `module` <> `{` _module-member-sequence_ `}` _module-member-sequence_ is an <> in which each element is a *module member*, and the terminating punctuation is a semicolon. A module member is one of the following: * A <> * A <> * A <> * A <> * A <> * A <> * A <> * A <> * A <> * A <> * An <> * An <> * An <> * An <> * An <> ==== Semantics A module definition _D_ qualifies the names of all the definitions inside it with its own name. Inside _D_, you can refer to definitions in _D_ by their unqualified name (the identifier appearing in the definition) or by their qualified name. Outside _D_, you have to use the qualified name. We say that the *scope* of the identifiers in the definitions in _D_ is limited to the inside of _D_. For further information about name scoping and qualification, see the section on <>. ==== Example [source,fpp] ---- module M { constant a = 0 constant b = a # Inside M, we can refer to M.a as a constant c = M.a # We can also say M.a here } constant d = M.a # Outside M, we have to say M.a constant e = a # Error: a is not in scope here ----