34 lines
731 B
Text
34 lines
731 B
Text
|
/* testing different statements
|
||
|
'condition' is not initialized
|
||
|
*/
|
||
|
class Main {
|
||
|
void main() {
|
||
|
if (condition) {
|
||
|
instructions();
|
||
|
asd.b = c;
|
||
|
if (cond2) {
|
||
|
|
||
|
} else {
|
||
|
nonEmptyBlock = a;
|
||
|
}
|
||
|
} else {
|
||
|
|
||
|
}
|
||
|
// Whiles
|
||
|
while (condition) {
|
||
|
while (anotherLoop == false) {
|
||
|
nestedLoops();
|
||
|
}
|
||
|
}
|
||
|
while (false) {} // emptyloop
|
||
|
// Returns
|
||
|
return; // empty
|
||
|
return expr; // with expressions (expressions already tested)
|
||
|
return array[index];
|
||
|
// Writes
|
||
|
write(a);
|
||
|
write(9 + 10);
|
||
|
writeln();
|
||
|
write(call());
|
||
|
}
|
||
|
}
|