Arduino Programming: Comment Syntax

To make our code more readable and easy for others to understand, we need to make some statements that to be ignored or not to be complied by the machine.



Sponser Links


Arduino comment syntax is exactly same as C/C++, we use // for single line comment and /* */ for multi-lines comments.

Here is a sample comment syntax for both single and multi-lines:

intCount=0; //this is a single line comment
            //anything after the slashes are comment

/* this is multi-lines comments, 
// it uses to block out the whole blocks of code.
// single line comment can be in multi-lines comments.

if intCount==0 {
  intCount = intCount + 1;
}
// don't forget to end the comment
*/

< BACK

This entry was posted in Software and tagged , . Bookmark the permalink.

One Response to Arduino Programming: Comment Syntax

  1. I bߋught all you intend,saved tߋ my bookmarkѕ,
    very decent internet site.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.