Search code examples
objective-cxcodesyntaxcomments

What’s the purpose of an exclamation mark at the start of a block comment? (That is, "/*! … */")


I just found this comment declaration in some xcode sample project:

/*!
@property masterVolume
@abstract Sets the master volume
*/
@property float masterVolume;

The comment is green as usual, the @property and @ abstract are dark green. If I remove the exclamation mark, they have the same green. What’s the purpose of the exclamation marks?


Solution

  • To make transition from headerdoc a bit simpler, appledoc (tool to generate documentation from code so you save time in documentation) also accepts headerdoc style multiline comments:

    /*! Comment */
    

    Source