Add system module with System class, core native exception helper and remove useless builtins
Build / AerScript (push) Successful in 50s
Build / AerScript (push) Successful in 50s
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import 'system';
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
private void test(int $a = (int(int $a, int $b, int $c){return $a+$b+$c;})(14, 10+2, 15), int $b = 0, int $c = 98) {
|
||||
Console::Print($a + PHP_EOL);
|
||||
Console::Print($b + PHP_EOL);
|
||||
Console::Print($c + PHP_EOL);
|
||||
Console::Print($a + System::NEW_LINE);
|
||||
Console::Print($b + System::NEW_LINE);
|
||||
Console::Print($c + System::NEW_LINE);
|
||||
}
|
||||
|
||||
public void main() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'system';
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
@@ -16,8 +17,8 @@ class Program {
|
||||
Console::Print("127.0.0.1 ==> $localhost\n");
|
||||
string $router = $this->encode_ip('192.168.2.1');
|
||||
Console::Print("192.168.2.1 ==> $router\n");
|
||||
Console::Print("$localhost ==> " + ($this->decode_ip($localhost) + PHP_EOL));
|
||||
Console::Print("$router ==> " + ($this->decode_ip($router) + PHP_EOL));
|
||||
Console::Print("$localhost ==> " + ($this->decode_ip($localhost) + System::NEW_LINE));
|
||||
Console::Print("$router ==> " + ($this->decode_ip($router) + System::NEW_LINE));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'system';
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
@@ -12,11 +13,11 @@ class Program {
|
||||
|
||||
public void main() {
|
||||
for(int $i = 1; $i < 3; $i++) {
|
||||
Console::Print($i + $this->cycle('a', 'b') + PHP_EOL);
|
||||
Console::Print($i + $this->cycle('a', 'b') + System::NEW_LINE);
|
||||
for(int $j = 1; $j < 5; $j++) {
|
||||
Console::Print(' ' + $j + $this->cycle('a', 'b', 1) + PHP_EOL);
|
||||
Console::Print(' ' + $j + $this->cycle('a', 'b', 1) + System::NEW_LINE);
|
||||
for(int $k = 1; $k < 3; $k++) {
|
||||
Console::Print(' ' + $k + $this->cycle('c', 'd', 2) + PHP_EOL);
|
||||
Console::Print(' ' + $k + $this->cycle('c', 'd', 2) + System::NEW_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user