Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
private string cycle(char $a, char $b, int $i = 0) {
|
||||
@@ -11,11 +12,11 @@ class Program {
|
||||
|
||||
public void main() {
|
||||
for(int $i = 1; $i < 3; $i++) {
|
||||
print($i + $this->cycle('a', 'b') + PHP_EOL);
|
||||
Console::Print($i + $this->cycle('a', 'b') + PHP_EOL);
|
||||
for(int $j = 1; $j < 5; $j++) {
|
||||
print(' ' + $j + $this->cycle('a', 'b', 1) + PHP_EOL);
|
||||
Console::Print(' ' + $j + $this->cycle('a', 'b', 1) + PHP_EOL);
|
||||
for(int $k = 1; $k < 3; $k++) {
|
||||
print(' ' + $k + $this->cycle('c', 'd', 2) + PHP_EOL);
|
||||
Console::Print(' ' + $k + $this->cycle('c', 'd', 2) + PHP_EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user