Wiki
Version 6 (modified by hopscc, 4 years ago)

--

Namespace

namespace NAMESPACEID

Declare a namespace to be followed by declarations belonging to it.

A namespace is used to define (and describe) the scope of a set of related enclosed objects. This scope lets you organize code and gives you a way to create globally unique types.

The namespace name (NAMESPACEID) may be a single toplevel Identifier ([A-Z][a-zA-Z0-9_]*) or a sequence of Identifiers separated by '.'.

Indenting the content of the namespace is optional.

Each identifier within the Namespace name sequence must start with an uppercase letter.

If a namespace is not specified items provided are assumed to be placed as if they were specified in a (toplevel) default namespace.

A Namespace may contain

Example

namespace Test
    ...

namespace Foo.Bar.Baz
   ...

namespace Say
   namespace Can
      ...
   ...