RAD Studio |  |

Defining A namespace
See Also
Collapse All

The grammar for defining a namespace is

Copy Code

    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:

Copy Code

    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

Copy Code

    namespace-body:
        declaration-seq opt

See Also

Declaring A namespace

Extending A namespace

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!