1,183
edits
m (Add instructions on namespaces) |
|||
Line 169: | Line 169: | ||
=== Namespace === | === Namespace === | ||
All code should be in the {{codeline|octave}} namespace or in a namespace below it. | All code should be in the {{codeline|octave}} namespace or in a namespace below it (but this is probably unnecessary. Just use the one {{codeline|octave}} namespace unless give permission to create a subspace). | ||
Namespaces should start and stop using the special macros {{codeline|OCTAVE_BEGIN_NAMESPACE(XXX)}} and {{codeline|OCTAVE_END_NAMESPACE(XXX)}}. There is no indentation of code that is placed into namespaces using these macros. | Namespaces should start and stop using the special macros {{codeline|OCTAVE_BEGIN_NAMESPACE(XXX)}} and {{codeline|OCTAVE_END_NAMESPACE(XXX)}}. There is no indentation of code that is placed into namespaces using these macros. | ||
Line 177: | Line 176: | ||
{{Code|Use of namespace macros|<syntaxhighlight lang="cpp"> | {{Code|Use of namespace macros|<syntaxhighlight lang="cpp"> | ||
OCTAVE_BEGIN_NAMESPACE(octave) | OCTAVE_BEGIN_NAMESPACE(octave) | ||
OCTAVE_BEGIN_NAMESPACE(math) | OCTAVE_BEGIN_NAMESPACE(math) | ||
edits