These are roughly a subset of those in Java |
if statements cannot use else if and must have statements to be executed placed in curly braces unless only one statement |
if( condition ) { |
Need curlies if more than one statement here; } |
else { // Optional of course |
Statements which can contain nested if's; } |
for and while are essentially as in Java |
for( initial expression ; condition; increment expression ) { |
statements to execute; } |
while(condition) { |
stuff to do as long as condition true; } |
break can appear in for or while loops and causes control to pass to statement after end of for or while loop. Named break's as in Java or PERL are not supported |
continue in a for or while loop skips over remaining statements in body and goes to next iteration of each loop |