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 int factorial(int $num) {
|
||||
@@ -9,7 +10,7 @@ class Program {
|
||||
|
||||
public void main() {
|
||||
int $num = 7;
|
||||
print('Factorial of ', $num, ' is ', $this->factorial($num), '.');
|
||||
Console::Print('Factorial of ' + $num + ' is ' + $this->factorial($num) + '.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user