Test while loop.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
88d382b76b
commit
a5da714d61
|
@ -0,0 +1,23 @@
|
||||||
|
class Program {
|
||||||
|
|
||||||
|
private int test() {
|
||||||
|
static int $x = 9;
|
||||||
|
return $x--;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void main() {
|
||||||
|
int $a;
|
||||||
|
int $b = 2;
|
||||||
|
while($a = $this->test()) {
|
||||||
|
int $b = $a;
|
||||||
|
if($b == 6) {
|
||||||
|
continue;
|
||||||
|
} else if($b == 3) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
print("$b\n");
|
||||||
|
}
|
||||||
|
print("$b\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
9
|
||||||
|
8
|
||||||
|
7
|
||||||
|
5
|
||||||
|
4
|
||||||
|
2
|
Loading…
Reference in New Issue