Aer Interpreter Source
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
563 B

class Program {
private string cycle(char $a, char $b, int $i = 0) {
static bool[] $switches;
if(array_key_exists($i, $switches))
$switches[$i] = !$switches[$i];
else
!($switches[$i] = true);
return ($switches[$i]) ? $a : $b;
}
public void main() {
for(int $i = 1; $i < 3; $i++) {
print($i + $this->cycle('a', 'b') + PHP_EOL);
for(int $j = 1; $j < 5; $j++) {
print(' ' + $j + $this->cycle('a', 'b', 1) + PHP_EOL);
for(int $k = 1; $k < 3; $k++) {
print(' ' + $k + $this->cycle('c', 'd', 2) + PHP_EOL);
}
}
}
}
}