Changes between Version 5 and Version 6 of Namespace
- Timestamp:
- 07/29/13 10:46:05 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Namespace
v5 v6 1 1 = Namespace = 2 2 {{{ 3 namespace <namespaceId>3 namespace NAMESPACEID 4 4 }}} 5 5 6 Declare a namespace to be followed by declarations belonging to it. Indenting the content of the namespace is optional.6 Declare a namespace to be followed by declarations belonging to it. 7 7 8 A namespace is used to define (and describe) the scope of a set of related enclosed objects. 9 This scope lets you organize code and gives you a way to create globally unique types. 8 10 9 <namespaceId> may be a single Toplevel Identifier ([A-Z][a-zA-Z0-9_]*) or a sequence of Identifiers separated by '.'.[[BR]]11 The namespace name (NAMESPACEID) may be a single toplevel Identifier ([A-Z][a-zA-Z0-9_]*) or a sequence of Identifiers separated by '.'.[[BR]] 10 12 11 Each Identifier within the Namespace sequence must start with an uppercase letter. 13 Indenting the content of the namespace is optional. 14 15 Each identifier within the Namespace name sequence must start with an uppercase letter. 16 17 If a namespace is '''not''' specified items provided are assumed to be placed as if they were specified in a (toplevel) default namespace. 12 18 13 19 A Namespace may contain 14 * A [wiki:CodeDoc DocString] directly after the namespace declaration documenting the Namespace. (Currently not implemented)20 * A [wiki:CodeDoc DocString] directly after the namespace declaration documenting the Namespace. 15 21 * [wiki:Classes Class Definition] 16 22 * [wiki:Interface Interface Definition] … … 20 26 * [wiki:TypeExtensions Extension Definition ] 21 27 * [wiki:MixIn Mixin Definition] 28 * [wiki:UseDirective Use directives] 29 * Another namespace declaration 22 30 23 31 == Example == … … 29 37 namespace Foo.Bar.Baz 30 38 ... 39 40 namespace Say 41 namespace Can 42 ... 43 ... 31 44 }}} 32 45