Although both styles are appropriate... It is better to use /* Style 1 / for variable declarations or assignments, where line of code is small, and use / style 2 */ for commenting methods or functions, where line of code is large.
In Xcode 5, how can I use comment ///
-
16-07-2023 - |
Frage
When I use comment like this
/* style 1 */
NSMutableArray *wayPoints; ///Player's wayPoints ARRAY
CGPoint velocity; ///Player's current speed and direction
Code documentation doesn't work. But when I code like this.
/* style 2 */
///Player's wayPoints ARRAY
NSMutableArray *wayPoints;
///Player's current speed and direction
CGPoint velocity;
It works. But it doesn't looks clear.
So how can I use like /* style 1 */
Lösung
Andere Tipps
yes use this /* your code for comment */ for multi line comment, use // this for single line comment and both are working for me in xcode 5
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow