My teams C-code guidelines write that it'd be better to place a '<' in a comment like shown below:
#define MAX_PACK_ITEM_NUM 50 /**< max number of item */
I wonder, what is the real use of this '<' ?
Use of Comments in CIt makes it easier for other developers to understand and use your code. While debugging there might be situations where we don't want some part of the code.
What is the difference between // comments and /* style comments? The double-slash comments (//) expire at the end of the line. Slash-star (/*) comments are in effect until a closing comment mark (*/).
Comments are text notes added to the program to provide explanatory information about the source code. They are used in a programming language to document the program and remind programmers of what tricky things they just did with the code and also helps the later generation for understanding and maintenance of code.
It's a way for doxygen
to generate documentation for members of a file/struct/union/class/enum. By using that marker, you can put comments after each member, leading to less clutter. You can read more about it here.
As others have replied, this is probably a comment that is meant for doxygen. When parsing comments, doxygen have some special rules:
/*
is ignored by doxygen./**
is treated as documentation of the next item after the comment in the source code./**<
is treated as documentation of the item immediately before the comment in the source code.Documentation is mostly placed above the documented item, e.g. a function. But in some cases such as a #define
it makes sense to put the documentation at the end of the line instead and in that case the /**<
marker is needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With