Menu

Confusion regarding void

2023-04-17
2023-04-17
  • Pratyush Jayachandran

    I'm trying to document a project written in C.

    I couldn't find the rules for documenting functions that return void and/or
    have no parameters.

    By extension of other rules, should it be
    @return void
    and
    @param void

    Omitting them will result in the document showing just blank.

    Is it left on the user to decide? What is the industry standard?

    Regards,
    Pratyush

     
  • Pratyush Jayachandran

    I forgot to mention. The way I am documenting right now is by writing the name of the parameter or return type and then the description.
    Example:

    /**
     * @ingroup ntp
     * @brief Receives and processes the NTP packet. 
     * @param length Length of the received NTP packet
     * @return void
     */
    void NTP_Handler(int16_t length);
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.