This commit is contained in:
parent
102e8447a1
commit
b668d0a897
23
tests/loop_do_while_test.aer
Normal file
23
tests/loop_do_while_test.aer
Normal file
@ -0,0 +1,23 @@
|
||||
class Program {
|
||||
|
||||
private int test() {
|
||||
static int $x = 9;
|
||||
return $x--;
|
||||
}
|
||||
|
||||
public void main() {
|
||||
int $a;
|
||||
do {
|
||||
$a = $this->test();
|
||||
int $z = $a;
|
||||
if($z == 6) {
|
||||
continue;
|
||||
} else if($z == 3) {
|
||||
break;
|
||||
}
|
||||
print("$z\n");
|
||||
} while($a);
|
||||
print("$a\n");
|
||||
}
|
||||
|
||||
}
|
6
tests/loop_do_while_test.exp
Normal file
6
tests/loop_do_while_test.exp
Normal file
@ -0,0 +1,6 @@
|
||||
9
|
||||
8
|
||||
7
|
||||
5
|
||||
4
|
||||
3
|
Loading…
Reference in New Issue
Block a user