filmov
tv
Arduino Syntax for Declaring ints

Показать описание
This video is an introduction to the syntax of declaring variables in the C++ language in the Arduino IDE. We demonstrate the syntax by creating int (integer) variables.
We also show some typical syntax errors. One error is caused by a failure to declare a variable before it is used. The other error is caused by failing to end each statement with a semicolon.
Instead of focusing on the errors, we could make these positive statements:
1. All variables must be declared before they are used, and
2. All statements must end with a semicolon.
These syntax rules are very basic, but the errors caused by violating these rules are very confusing to students.
We also show some typical syntax errors. One error is caused by a failure to declare a variable before it is used. The other error is caused by failing to end each statement with a semicolon.
Instead of focusing on the errors, we could make these positive statements:
1. All variables must be declared before they are used, and
2. All statements must end with a semicolon.
These syntax rules are very basic, but the errors caused by violating these rules are very confusing to students.