Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class

This commit is contained in:
2026-11-23 18:36:46 +01:00
parent 2243557bf5
commit 4d06edd045
55 changed files with 1679 additions and 675 deletions
+10 -9
View File
@@ -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");
}
}