NAMESPACE-ENDNAMESPACE
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
NAMESPACE name member_def . . . ENDNAMESPACE
Arguments
name
The name of the namespace to define.
member_def
Either the declaration of a class, structure, interface, enumeration, or delegate within the namespace, or another namespace declaration. (Nested namespaces are not allowed in the default namespace in Synergy .NET.) You can specify as many member definitions as you want, as long as you specify at least one.
Discussion
The NAMESPACE-ENDNAMESPACE statement creates a namespace, which enables you to group related entities together for use in a Synergy application.
Name can consist of multiple nested namespace names, separated by a period. For example,
namespace space1.space2
A namespace name must be unique among all other identifiers within the same namespace.
To avoid unnecessary imports across source files, we strongly recommend that subroutines and functions be declared outside of a namespace. If they’re declared within a namespace, you’ll get an INNSPACE warning. |
Examples
The example below creates the namespace space1, which defines the classes class1 and class2.
namespace space1 class class1 . . . endclass class class2 . . . endclass endnamespace