Doxygen @return vs. @retval

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Feb 28 15:03:08 UTC 2019


Hello,

we agreed to use @retval instead of @return:

https://docs.rtems.org/branches/master/eng/coding-doxygen.html#doxygen-best-practices

How should we indicate that not a particular value is returned, but 
instead an element of a set. For example:

/**
  * @brief Performs something and returns the operation status.
  *
  * @retval 0 Successful operation.
  * @retval EIO Input/output error.
  * @retval <otherwise> Any other value will not be returned.
  */
int f(void);

/**
  * @brief Creates an object.
  *
  * @retval NULL Not enough resources to create an object.
  * @retval <object> Pointer to created object.
  */
T *create(void);

We may also use "[object]" or "{object}" or "object" or whatever.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list