简体   繁体   English

C代码注释样式的一些疑惑

[英]some doubts about the style of C code comments

I have some doubts about the style of C code comments.我对C代码注释的风格有些疑惑。 like this:像这样:

/* \brief Creates a new shm pcm */

sometimes it like this:有时是这样的:

/* \!brief Creates a new shm PCM */

What is the difference between the "\brief" and "\!brief" "\brief" 和 "\!brief" 有什么区别

Those are comments meant for DoxyGen , a system to generate documentation from the source code.这些是针对DoxyGen的注释,这是一个从源代码生成文档的系统。

For the compiler, there is absolutely no difference at all.对于编译器来说,完全没有区别。

DoxyGen expects /*! */ DoxyGen 期望/*! */ /*! */ and /** */ to flag that the comments are meant for it, see the documentation . /*! *//** */来标记注释是针对它的,请参阅文档

As albert mentioned, it looks like that in src/pcm/pcm.c some years back someone confused /*. \brief...正如阿尔伯特所提到的,几年前在src/pcm/pcm.c中似乎有人感到困惑/*. \brief... /*. \brief... with /* \!brief /*. \brief.../* \!brief

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM