Xcode documentation comment syntax

I was wondering if anyone could explain what / if there is any difference between the two comment syntaxes in Xcode.

/**
 * comments
 */

/*!
 * comments
 */

      

Both seem to allow Xcode to display your comments as documentation, but I'm not sure if there is a difference between the two.

+3


source to share


2 answers


They are functionally equivalent. /*!

is the HeaderDoc style and /**

is the JavaDoc that Doxygen usually uses . Xcode 5 supports HeaderDoc and Doxygen / JavaDoc formats.



+4


source


Both are equivalent in functionality.

Differences:

/ **



  • Doxygen style
  • If you use the command headerdoc2html

    , comments /**

    will not be present in the documentation file, they will skip those comments (see HeaderDoc which does not generate HTML documentation )

/ *!

  • Header style
  • If you use the command headerdoc2html

    , the comments /*!

    will show up in the HTML documentation file as opposed to / **
0


source







All Articles