You are here: More Information > FAQ
Special Tasks
Technical Reference
> Output
Parsing
Comment Parsing
Output
Special Tasks
> Why are comments inserted after empty macros?
Close
Doc-O-Matic 10
Why are comments inserted after empty macros?

Assume in your source code is a function:

PREFIX int test();

You redefine PREFIX as a "space" and add it to your project via the macros feature on the [General Settings] > Source Parsing > C++ Options page. 

If you use the Editor to write comments to your source code, Doc-O-Matic inserts new text between "PREFIX" and "int test()", instead of in front of PREFIX. 

The problem is that Doc-O-Matic can not determine whether or not PREFIX should be part of test(). It could very well be that PREFIX does not really belong to test(), as in the following example.

SOME_DECL int test();

with SOME_DECL expanding to empty in release code but to some debug function when debug-building the source. In this case, inserting the comment in front of SOME_DECL would clearly be an error. 

To use an empty macro and force Doc-O-Matic to insert comments in front of PREFIX, change the macro and let it expand to something non-empty, when editing your source. When you're done switch it back to empty for building the documentation.

C++ Options

Copyright © 2000-2020 toolsfactory software inc. All rights reserved.