| <compound statement> | -> | {
| | | //a sequence of <statements>s
| | | each followed by a semicolon//
| | | }
| |
- {
- s = "Hello!";
- k = result5;
- }
| #12 | <compound statement> | -> | { |
| <statement> | |||
| <statement> | |||
| } | |||
| <compound statement> | -> | { | |
| #11 | <identifier>=<expression>; | ||
| #11 | <identifier>=<expression>; | ||
| } | |||
| <compound statement> | -> | { | |
| #1 | s=<expression>; | ||
| #1 | k=<expression>; | ||
| } | |||
| <compound statement> | -> | { | |
| #2 | s=<str expression>; | ||
| #3 | k=<int expression>; | ||
| } | |||
| <compound statement> | -> | { | |
| #5 | s="Hello!"; | ||
| #8 | k=results; | ||
| } | |||
| 13. | <statement> | -> | if (<boolean expression>)
| | | <compound statement>
| | | else
| | | <compound statement>
| |
| 14. | <statement> | -> | if (<boolean expression>)
| | | <compound statement>
| |
while Loop
- while (boolean expression)
- {
- statement;
- ...
- statement;
- }