Files
Aer/tests/operators_precedence.aer
T

24 lines
734 B
Plaintext

import 'console';
class Program {
string[] testArray() {
return {'Machine' => 'Turing'};
}
callback[] testCallback() {
return {'callme' => void() { Console::Print("Hello world\n"); }};
}
public void main() {
callback[] $constr = { void(string $s) { Console::Print($s); } };
Console::Print($this->testArray()['Machine'] + "\n");
$this->testCallback()['callme']();
Console::Print(true ? "TRUE\n" : false ? "true\n" : "false\n");
(void(string $name) { Console::Print("This should work too - $name.\n");})('AerScript');
$constr[0]('Test finished.' + "\n");
callback[] $map = {'up' => 'strtoupper', 'low' => 'strtolower'};
Console::Print("%s|%s\n", $map['up']("UPPER/lower"), $map['low']("UPPER/lower"));
}
}