Semicolons

A semicolon is used at the end of every statement to separate one statement from the next. If a statement does not end with a semicolon it will result in a compile-time error. The error text for forgetting a semicolon is pretty obvious and will include the line number of the statement that is missing it.

Semicolons are also used in the for loop to separate the different elements. We will look at the for loop in the Looping section of this chapter. Now let's look at how we can add comments to our code.

Get Mastering Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.