* * Curly brackets following for(), if(), do, and case() statements * should follow the statement on the same line. There should be spaces around binary operators, no * spaces between a unary operator and its operand. Whether you’re using Doxygen or XML Doc Comments, Visual Studio version 16.6 Preview 2 provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support. */ /* * There should be no space between keywords and the first * parenthesis. */ int i /* Use short variable names for loop counters. * * Local variables should always be declared at the start of the * function. * * Function prototypes have the return type on one line, * the name and arguments on one line (with no space * between the name and the first parenthesis), followed * by a single curly bracket on its own line. The text following the introduction is used * as the function's documentation. * * This template should always be used to document * functions. * * Put a longer description of what the function does * after the preamble of Doxygen keywords. ![]() * \retval 0 Functions that return a few specified values * \retval 1 can use the \retval keyword instead of \return. * \return Briefly describe the return value. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code. * \param c Briefly describe all parameters. */ /*-*/ /** * \brief Use Doxygen documentation for functions. * * Put dividers (a single-line comment consisting only of dashes) * between functions. ![]() This makes it easy * to know where to look for function and variable definitions. * * All variables and functions that are visible outside of the file * should have the module name prepended to them. This keeps the size of the symbol table down. ![]() */ #include "contiki.h" /* * Make sure that non-global variables are all maked with the static * keyword. Comments should prefferably be * full sentences, filled to look like real paragraphs. */ /* * Multi-line comments look like this. */ /* Single line comments look like this. * \author * Adam Dunkels * * Every file that is part of a documented module has to have * a \file block, else it will not show up in the Doxygen * "Modules" * section. * * */ /** * \file * A brief description of what this file is. Typically, the \defgroup is placed in * the. ** * \defgroup coding-style Coding style * * This is how a Doxygen module is documented - start with a \defgroup * Doxygen keyword at the beginning of the file to define a module, * and use the \addtogroup Doxygen keyword in all other files that * belong to the same module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |