Statement or Expression:
A statement
(or expression) is simply a single line of code that performs some action. All
statements/expressions end with a semicolon. It might be
v to declare a variable,
v to add two numbers,
v to compare two values, etc...
In the
CSR_Rescue, you can write your own statement in the advanced action panel
instead of using the graphical interface.
If statement:
Flow chart:
Program:
If – else statement:
v If the condition is true, execute the first
block of code.
v If the condition is not true, then execute
the second block of code.
Program:
Switch Statements
v A switch statement is literally saying,
“Switch the path you take through the code based on the value of some
variable.”
v A switch can only be done on a single
character or on an integer value.
Program:
Related Topics