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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
|
sort(L):
integer 3
integer 4
list 1 2 3 4 5 95 96 97 98 99 100
list 1 5 9
list 5 &null 5
list 4 4 4 4
list 3 3 3
list &null 25
list 2 2
list 1
list &null &null
list
r1 2
r1 4
r1 8
r3 3 1 4
r3 2 6 5
r3 3 5 &null
r3 7 8 9
-------------------- testing n = &null
sortf(L,n):
integer 3
integer 4
list
list &null 25
list &null &null
list 1 2 3 4 5 95 96 97 98 99 100
list 1 5 9
list 1
list 2 2
list 3 3 3
list 4 4 4 4
list 5 &null 5
r1 2
r3 2 6 5
r3 3 1 4
r3 3 5 &null
r1 4
r3 7 8 9
r1 8
sortf(S,n) [same]
-------------------- testing n = 1
sortf(L,n):
integer 3
integer 4
list
list &null 25
list &null &null
list 1 2 3 4 5 95 96 97 98 99 100
list 1 5 9
list 1
list 2 2
list 3 3 3
list 4 4 4 4
list 5 &null 5
r1 2
r3 2 6 5
r3 3 1 4
r3 3 5 &null
r1 4
r3 7 8 9
r1 8
sortf(S,n) [same]
-------------------- testing n = 2
sortf(L,n):
integer 3
integer 4
list 1
list
list 5 &null 5
list &null &null
list 1 2 3 4 5 95 96 97 98 99 100
list 2 2
list 3 3 3
list 4 4 4 4
list 1 5 9
list &null 25
r1 2
r1 4
r1 8
r3 3 1 4
r3 3 5 &null
r3 2 6 5
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = 3
sortf(L,n):
integer 3
integer 4
list &null 25
list 2 2
list 1
list &null &null
list
list 1 2 3 4 5 95 96 97 98 99 100
list 3 3 3
list 4 4 4 4
list 5 &null 5
list 1 5 9
r1 2
r1 4
r1 8
r3 3 5 &null
r3 3 1 4
r3 2 6 5
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = 4
sortf(L,n):
integer 3
integer 4
list 1 5 9
list 5 &null 5
list 3 3 3
list &null 25
list 2 2
list 1
list &null &null
list
list 1 2 3 4 5 95 96 97 98 99 100
list 4 4 4 4
r1 2
r1 4
r1 8
r3 3 1 4
r3 2 6 5
r3 3 5 &null
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = 17
sortf(L,n):
integer 3
integer 4
list 1 5 9
list 5 &null 5
list 4 4 4 4
list 3 3 3
list &null 25
list 2 2
list 1
list &null &null
list
list 1 2 3 4 5 95 96 97 98 99 100
r1 2
r1 4
r1 8
r3 3 1 4
r3 2 6 5
r3 3 5 &null
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = -4
sortf(L,n):
integer 3
integer 4
list 1 5 9
list 5 &null 5
list 3 3 3
list &null 25
list 2 2
list 1
list &null &null
list
list 4 4 4 4
list 1 2 3 4 5 95 96 97 98 99 100
r1 2
r1 4
r1 8
r3 3 1 4
r3 2 6 5
r3 3 5 &null
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = -3
sortf(L,n):
integer 3
integer 4
list &null 25
list 2 2
list 1
list &null &null
list
list 1 5 9
list 3 3 3
list 4 4 4 4
list 5 &null 5
list 1 2 3 4 5 95 96 97 98 99 100
r1 2
r1 4
r1 8
r3 2 6 5
r3 3 1 4
r3 3 5 &null
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = -2
sortf(L,n):
integer 3
integer 4
list 1
list
list 5 &null 5
list &null 25
list &null &null
list 2 2
list 3 3 3
list 4 4 4 4
list 1 5 9
list 1 2 3 4 5 95 96 97 98 99 100
r1 2
r1 4
r1 8
r3 3 1 4
r3 3 5 &null
r3 2 6 5
r3 7 8 9
sortf(S,n) [same]
-------------------- testing n = -1
sortf(L,n):
integer 3
integer 4
list
list &null &null
list 1
list 2 2
list 3 3 3
list 4 4 4 4
list 5 &null 5
list 1 5 9
list &null 25
list 1 2 3 4 5 95 96 97 98 99 100
r3 3 5 &null
r1 2
r1 4
r3 3 1 4
r3 2 6 5
r1 8
r3 7 8 9
sortf(S,n) [same]
0
-1
i j ~j i & j i | j i ^ j i << j i >> j
1 0
00000001 00000000 FFFFFFFF 00000000 00000001 00000001 00000001 00000001
1 1
00000001 00000001 FFFFFFFE 00000001 00000001 00000000 00000002 00000000
1 2
00000001 00000002 FFFFFFFD 00000000 00000003 00000003 00000004 00000000
1 3
00000001 00000003 FFFFFFFC 00000001 00000003 00000002 00000008 00000000
1 4
00000001 00000004 FFFFFFFB 00000000 00000005 00000005 00000010 00000000
1 100
00000001 00000064 FFFFFF9B 00000000 00000065 00000065 00000000 00000000
i j ~j i & j i | j i ^ j i << j i >> j
2 0
00000002 00000000 FFFFFFFF 00000000 00000002 00000002 00000002 00000002
2 1
00000002 00000001 FFFFFFFE 00000000 00000003 00000003 00000004 00000001
2 2
00000002 00000002 FFFFFFFD 00000002 00000002 00000000 00000008 00000000
2 3
00000002 00000003 FFFFFFFC 00000002 00000003 00000001 00000010 00000000
2 4
00000002 00000004 FFFFFFFB 00000000 00000006 00000006 00000020 00000000
2 100
00000002 00000064 FFFFFF9B 00000000 00000066 00000066 00000000 00000000
i j ~j i & j i | j i ^ j i << j i >> j
3 0
00000003 00000000 FFFFFFFF 00000000 00000003 00000003 00000003 00000003
3 1
00000003 00000001 FFFFFFFE 00000001 00000003 00000002 00000006 00000001
3 2
00000003 00000002 FFFFFFFD 00000002 00000003 00000001 0000000C 00000000
3 3
00000003 00000003 FFFFFFFC 00000003 00000003 00000000 00000018 00000000
3 4
00000003 00000004 FFFFFFFB 00000000 00000007 00000007 00000030 00000000
3 100
00000003 00000064 FFFFFF9B 00000000 00000067 00000067 00000000 00000000
file(concord.dat)
11
"eoptera, ("
21
21
1212
"."
1213
oops -- function char(-65536)
oops -- function char(-337)
oops -- function char(-1)
oops -- function char(256)
oops -- function char(4713)
oops -- function char(65536)
oops -- function char(123456)
oops -- function char("abc")
oops -- function char(&lcase)
oops -- function char(&errout)
oops -- function char(list_34(0))
oops -- function ord("")
oops -- function ord("ab")
oops -- function ord("antidisestablishmentarianism")
oops -- function ord(47)
oops -- function ord(&output)
oops -- function ord(table_1(0))
getenv $HOME succeeded
getenv $FOOBAR failed
found file: .
found file: ..
found file: Makefile
found file: recent.icn
found file: recogn.dat
&ascii
&cset
&digits
'123456789'
&letters
&letters
&lcase
list_36(1)
list_37(2)
list_38(3)
list_39(4)
list_40(0)
p(1):
image(a):1
image(b):&null
image(c):list_43(0)
every write("\t", !c):
p(1, 2):
image(a):1
image(b):2
image(c):list_44(0)
every write("\t", !c):
p(1, 2, 3):
image(a):1
image(b):2
image(c):list_45(1)
every write("\t", !c):
3
p(1, 2, 3, 4, 5):
image(a):1
image(b):2
image(c):list_46(3)
every write("\t", !c):
3
4
5
q(1, 2):
every write("\t", !a):
1
2
t := table("default") --> table_2(0)
*t --> 0
t["xyz"] --> "default"
member(t, "xyz") --> failure
contents of t:
insert(t, 3, 4) --> table_2(1)
insert(t, "xyz", "abc") --> table_2(2)
insert(t, &digits) --> table_2(3)
*t --> 3
t["xyz"] --> "abc"
member(t, "xyz") --> "xyz"
contents of t:
3 : 4
"xyz" : "abc"
&digits : &null
t["xyz"] := "new value" --> "new value"
*t --> 3
t["xyz"] --> "new value"
member(t, "xyz") --> "xyz"
contents of t:
3 : 4
"xyz" : "new value"
&digits : &null
insert(t, "xyz", "def") --> table_2(3)
*t --> 3
t["xyz"] --> "def"
member(t, "xyz") --> "xyz"
contents of t:
3 : 4
"xyz" : "def"
&digits : &null
delete(t, "xyz") -- > table_2(2)
*t --> 2
t["xyz"] --> "default"
member(t, "xyz") --> failure
contents of t:
3 : 4
&digits : &null
delete(t, "xyz") -- > table_2(2)
*t --> 2
t["xyz"] --> "default"
member(t, "xyz") --> failure
contents of t:
3 : 4
&digits : &null
t := table("default") --> table_3(0)
t["one"] := 1 --> 1
t[] --> "default"
x := r1([t, [1, [2, 3]]]) --> record r1_4(1)
x[1, 1, "one"] --> 1
x[1, 2, 2, 2] --> 3
x[1, 2] := ["abcd", "defg"] --> list_57(2)
x[1, 2, 2, 2] --> "e"
|