3

I was wondering if someone could explain what/if there is any difference between the following two comment syntax in Xcode.

/**
 * comments
 */

/*!
 * comments
 */

It seems like both allow Xcode to display your comments as documentation but I'm not sure if there is a difference between the two.

1
  • 2
    It matters if there is a difference between the two Commented Dec 4, 2014 at 12:19

2 Answers 2

4

They are functionally equivalent. /*! is a HeaderDoc style opener and /** is a JavaDoc style opener commonly used by doxygen. Xcode 5 supports both HeaderDoc and doxygen/JavaDoc formats.

Sign up to request clarification or add additional context in comments.

Comments

0

Both are equivalent by functionality.

Differences:

/**

  1. Doxygen style
  2. If you use headerdoc2html command, the /** based comments won't be present in the documentation file, it'll skip those comments (Refer HeaderDoc not generating HTML Documentation)

/*!

  1. HeaderDoc style
  2. If you use headerdoc2html command the /*! comments will be displayed on the documentation file in HTML format unlike /**

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.