1 | if statements must have multiple statements inside curly braces: |
2 | if ( condition ) { |
3 | statement1; statement2; |
4 | } else { // optional of course |
5 | statement3; statement4; |
6 | } |
7 | Note: there is no else if construct |
8 | for and while are essentially the same as in Java: |
9 | for ( init-exp; condition; incr-exp ) { |
10 | statement1; statement2; |
11 | } |
12 | while ( condition ) { |
13 | statement1; statement2; |
14 | } |
15 | break and continue in for and while loops are permitted. Named break as in Java or PERL are not supported. |