1
use Language::INTERCAL;
2
use Language::INTERCAL::Runtime::Library;
8
@@@@@@@��@K�@L`@{���[|�J{��{�����J{�
9
@@@@@@@������@����@���@K�
10
@@@@@@@������@����@���@K�
11
@@@@@@@������@����@���@K�
12
@@@@@@@������@����@���@K�
13
@@@@@@@��@K�@L`@{���K�JK��K�JK�
18
@@@@@@@������@����@���@K�
19
@@@@@@@������@����@���@K�
20
@@@@@@@��@K�@L`@{���[|�
21
@@@@@@@������@����@���@K�
22
@@@@@@@��@K�@L`@K�aPK�
24
@@@@@@@��@K�@L`@K�a�K�
26
@@@@@@@��@K�@L`@K�aeK�
28
@@@@@@@��@K�@L`@{���K�J{��{�����J{�
34
fiddle Language::INTERCAL 'bug=0', 'ubug=0';
38
compile Language::INTERCAL 'prog', $prog;
40
eval { prog(0, \&foo) };
41
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
42
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 1\n";
43
print @foo == 14 ? "" : "not ", "ok 2\n";
44
print shift @foo eq "LII\n" ? "" : "not ", "ok 3\n";
45
print shift @foo eq "XIV\n" ? "" : "not ", "ok 4\n";
46
print shift @foo eq "X\n" ? "" : "not ", "ok 5\n";
47
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 6\n";
48
print shift @foo eq "XXII\n" ? "" : "not ", "ok 7\n";
49
print shift @foo eq "VI\n" ? "" : "not ", "ok 8\n";
50
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 9\n";
51
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 10\n";
52
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 11\n";
53
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 12\n";
54
print shift @foo eq "XXX\n" ? "" : "not ", "ok 13\n";
55
print shift @foo eq "LXII\n" ? "" : "not ", "ok 14\n";
56
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 15\n";
57
print shift @foo eq "XX\n" ? "" : "not ", "ok 16\n";
59
compile Language::INTERCAL 'prog_o', $prog, 'opt';
61
eval { prog_o(0, \&foo) };
62
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
63
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 17\n";
64
print @foo == 14 ? "" : "not ", "ok 18\n";
65
print shift @foo eq "LII\n" ? "" : "not ", "ok 19\n";
66
print shift @foo eq "XIV\n" ? "" : "not ", "ok 20\n";
67
print shift @foo eq "X\n" ? "" : "not ", "ok 21\n";
68
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 22\n";
69
print shift @foo eq "XXII\n" ? "" : "not ", "ok 23\n";
70
print shift @foo eq "VI\n" ? "" : "not ", "ok 24\n";
71
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 25\n";
72
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 26\n";
73
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 27\n";
74
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 28\n";
75
print shift @foo eq "XXX\n" ? "" : "not ", "ok 29\n";
76
print shift @foo eq "LXII\n" ? "" : "not ", "ok 30\n";
77
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 31\n";
78
print shift @foo eq "XX\n" ? "" : "not ", "ok 32\n";
80
compile Language::INTERCAL 'prog_q', $prog, 'quantum';
82
eval { prog_q(0, \&foo) };
83
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
84
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 33\n";
85
print @foo == 14 ? "" : "not ", "ok 34\n";
86
print shift @foo eq "LII\n" ? "" : "not ", "ok 35\n";
87
print shift @foo eq "XIV\n" ? "" : "not ", "ok 36\n";
88
print shift @foo eq "X\n" ? "" : "not ", "ok 37\n";
89
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 38\n";
90
print shift @foo eq "XXII\n" ? "" : "not ", "ok 39\n";
91
print shift @foo eq "VI\n" ? "" : "not ", "ok 40\n";
92
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 41\n";
93
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 42\n";
94
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 43\n";
95
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 44\n";
96
print shift @foo eq "XXX\n" ? "" : "not ", "ok 45\n";
97
print shift @foo eq "LXII\n" ? "" : "not ", "ok 46\n";
98
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 47\n";
99
print shift @foo eq "XX\n" ? "" : "not ", "ok 48\n";
101
compile Language::INTERCAL 'prog_p', $prog, 'post';
103
eval { prog_p(0, \&foo) };
104
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
105
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 49\n";
106
print @foo == 14 ? "" : "not ", "ok 50\n";
107
print shift @foo eq "LII\n" ? "" : "not ", "ok 51\n";
108
print shift @foo eq "XIV\n" ? "" : "not ", "ok 52\n";
109
print shift @foo eq "X\n" ? "" : "not ", "ok 53\n";
110
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 54\n";
111
print shift @foo eq "XXII\n" ? "" : "not ", "ok 55\n";
112
print shift @foo eq "VI\n" ? "" : "not ", "ok 56\n";
113
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 57\n";
114
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 58\n";
115
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 59\n";
116
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 60\n";
117
print shift @foo eq "XXX\n" ? "" : "not ", "ok 61\n";
118
print shift @foo eq "LXII\n" ? "" : "not ", "ok 62\n";
119
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 63\n";
120
print shift @foo eq "XX\n" ? "" : "not ", "ok 64\n";
122
compile Language::INTERCAL 'prog_qp', $prog, 'quantum', 'post';
124
eval { prog_qp(0, \&foo) };
125
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
126
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 65\n";
127
print @foo == 14 ? "" : "not ", "ok 66\n";
128
print shift @foo eq "LII\n" ? "" : "not ", "ok 67\n";
129
print shift @foo eq "XIV\n" ? "" : "not ", "ok 68\n";
130
print shift @foo eq "X\n" ? "" : "not ", "ok 69\n";
131
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 70\n";
132
print shift @foo eq "XXII\n" ? "" : "not ", "ok 71\n";
133
print shift @foo eq "VI\n" ? "" : "not ", "ok 72\n";
134
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 73\n";
135
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 74\n";
136
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 75\n";
137
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 76\n";
138
print shift @foo eq "XXX\n" ? "" : "not ", "ok 77\n";
139
print shift @foo eq "LXII\n" ? "" : "not ", "ok 78\n";
140
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 79\n";
141
print shift @foo eq "XX\n" ? "" : "not ", "ok 80\n";
143
compile Language::INTERCAL 'prog_d', $prog, 'dbhook';
145
_run_db(prog_d(0, \&foo));
146
print $@ if $@ !~ /275 ASSIGNMENT TO CONSTANT/;
147
print $@ =~ /275 ASSIGNMENT TO CONSTANT/ ? "" : "not ", "ok 81\n";
148
print @foo == 14 ? "" : "not ", "ok 82\n";
149
print shift @foo eq "LII\n" ? "" : "not ", "ok 83\n";
150
print shift @foo eq "XIV\n" ? "" : "not ", "ok 84\n";
151
print shift @foo eq "X\n" ? "" : "not ", "ok 85\n";
152
print shift @foo eq "XXXII\n" ? "" : "not ", "ok 86\n";
153
print shift @foo eq "XXII\n" ? "" : "not ", "ok 87\n";
154
print shift @foo eq "VI\n" ? "" : "not ", "ok 88\n";
155
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 89\n";
156
print shift @foo eq "CCLV\n" ? "" : "not ", "ok 90\n";
157
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 91\n";
158
print shift @foo eq "DLXXII\n" ? "" : "not ", "ok 92\n";
159
print shift @foo eq "XXX\n" ? "" : "not ", "ok 93\n";
160
print shift @foo eq "LXII\n" ? "" : "not ", "ok 94\n";
161
print shift @foo eq "XXVIII\n" ? "" : "not ", "ok 95\n";
162
print shift @foo eq "XX\n" ? "" : "not ", "ok 96\n";
165
push @foo, join('', @_);