Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class
This commit is contained in:
+10
-9
@@ -1,3 +1,4 @@
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
private string num2Roman(int $num) {
|
||||
@@ -17,15 +18,15 @@ class Program {
|
||||
}
|
||||
|
||||
public void main() {
|
||||
print(' 7 => ' + $this->num2Roman(7) + "\n");
|
||||
print(' 9 => ' + $this->num2Roman(9) + "\n");
|
||||
print(' 11 => ' + $this->num2Roman(11) + "\n");
|
||||
print(' 42 => ' + $this->num2Roman(42) + "\n");
|
||||
print(' 105 => ' + $this->num2Roman(105) + "\n");
|
||||
print('1984 => ' + $this->num2Roman(1984) + "\n");
|
||||
print('1999 => ' + $this->num2Roman(1999) + "\n");
|
||||
print('2018 => ' + $this->num2Roman(2018) + "\n");
|
||||
print('2144 => ' + $this->num2Roman(2144) + "\n");
|
||||
Console::Print(' 7 => ' + $this->num2Roman(7) + "\n");
|
||||
Console::Print(' 9 => ' + $this->num2Roman(9) + "\n");
|
||||
Console::Print(' 11 => ' + $this->num2Roman(11) + "\n");
|
||||
Console::Print(' 42 => ' + $this->num2Roman(42) + "\n");
|
||||
Console::Print(' 105 => ' + $this->num2Roman(105) + "\n");
|
||||
Console::Print('1984 => ' + $this->num2Roman(1984) + "\n");
|
||||
Console::Print('1999 => ' + $this->num2Roman(1999) + "\n");
|
||||
Console::Print('2018 => ' + $this->num2Roman(2018) + "\n");
|
||||
Console::Print('2144 => ' + $this->num2Roman(2144) + "\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user