[Tinyos Core WG] Preparing for the RPM

David Gay dgay42 at gmail.com
Mon Oct 30 09:12:45 PST 2006


On 10/30/06, Joe Polastre <joe at polastre.com> wrote:
> Actually, not completely true.  If #include is the first thing, and
> then the nesdoc documentation comes after but before the
> configuration{}, implementation{} etc lines, then it will generate
> correctly.  We had to deal with this in Boomerang, and the easiest fix
> was to put #include first.

The problem is that a documentation comment applies to the next
declared entity (variable, function, module basically). If you have a
#include in there, the next declared entity is the first thing
declared by that #include... (except if the #include declares nothing,
e.g., if it's all macros, or fails it's #ifndef FOO_H test)

So the conclusion is simple: always put the documentation comment
right before the thing that it applies to.

David


More information about the Tinyos-2.0wg mailing list