RAD Studio
ContentsIndex
PreviousUpNext
Defining A namespace

The grammar for defining a namespace is

original-namespace-name:
    identifier
 namespace-definition:
    original-namespace-definition
    extension-namespace-definition
    unnamed-namespace-definition

Grammatically, there are three ways to define a namespace with the namespace keyword:

original-namespace-definition:
    namespace identifier { namespace-body }
extension-namespace-definition:
    namespace original-namespace-name { namespace-body }
unnamed-namespace-definition:
    namespace { namespace-body }

The body is an optional sequence of declarations. The grammar is

namespace-body:
    declaration-seq opt
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!