Friday, 31 May 2013

How to comment code: Xcode

Comment lines are used for separating some words or sentences from the executing code. In Xcode and cocos2d objective C platforms, you can comment lines as below:
  •     Insert " // " infront of any line for single line comments 
  •     Use "/* ....... */" for multi-line comments    
Example:
       
       1)   // This line is commented and
                 this second line is not commented.

      2)   /*
                By using this method, both the first line and
                the second line are commented
            */

No comments:

Post a Comment