Arduino Statements
Arduino Statements
While (condition)
{
statements;
}
Switch
Switch statement is like a really nifty version of
the if statement in that it can execute one or
more blocks of code, depending on a range of
conditions.
This basically a statement that compares the
value of an expression against a list of cases
executing whatever code begins after that case
when a match is found.
Switch (expression)
{
case constant;
statements;
case constant;
statements;
default;
statements;
}
This can be used inside other control
Break statements to immediately end the loop or
statements.