1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
print('entry'); var label; var state; var decisions = [3, 3, 4, 1, 2, 1, 2, 4, 4, 4, 2, 3, 3, 1, 2]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] }
switch (the_var) {
default: {
}
}
print(1); state = check();
switch (the_var) {
default: {
}
}
print(3); state = check();
switch (the_var) {
default: {
}
}
while(1) {
print(4); state = check();
switch (the_var) {
default: {
}
}
}
|