|
|
1.1 root 1:
2:
3:
4: IMAGE(2) Icon Program Library IMAGE(2)
5:
6:
7:
8: NNNNAAAAMMMMEEEE
9: Image - generalized string image of Icon value
10:
11: SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
12: IIIImmmmaaaaggggeeee((((xxxx))))
13: IIIImmmmaaaaggggeeeexxxx((((xxxx))))
14:
15: DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
16: The procedure IIIImmmmaaaaggggeeee((((xxxx)))) produces a string image of the value
17: xxxx. The value produced is a generalization of the value pro-
18: duced by the Icon function iiiimmmmaaaaggggeeee((((xxxx)))), providing detailed
19: information about structures.
20:
21: Tags are used to uniquely identify structures. A tag con-
22: sists of a letter identifying the type followed by an
23: integer. The tag letters are LLLL for lists, RRRR for records, and
24: TTTT for tables. The first time a structure is encountered, it
25: is imaged as the tag followed by a colon, followed by a
26: representation of the structure. If the same structure is
27: encountered again, only the tag is given.
28:
29: An example is
30:
31: a := ["x"]
32: push(a,a)
33: t := table()
34: push(a,t)
35: t[a] := t
36: t["x"] := []
37: t[t] := a
38: write(Image(t))
39:
40: which produces
41:
42: T1:["x"->L1:[],L2:[T1,L2,"x"]->T1,T1->L2]
43:
44: Note that a table is represented as a list of entry and
45: assigned values separated by ---->>>>s.
46:
47: The procedure IIIImmmmaaaaggggeeeexxxx((((xxxx)))) is similar to IIIImmmmaaaaggggeeee((((xxxx)))), except that
48: newlines and spaces are inserted to that the printed result
49: is displayed on multiple lines with indentation. There are
50: other formatting details that differ between the two pro-
51: cedures. For the example given above, the result of
52:
53: write(Imagex(t))
54:
55: is
56:
57: T1:{
58: "x"
59: ---
60:
61:
62:
63: Version 5.9 The University of Arizona - 6/28/83 1
64:
65:
66:
67:
68:
69:
70: IMAGE(2) Icon Program Library IMAGE(2)
71:
72:
73:
74: L1:[]
75: ]
76: ------
77: L2:[
78: T1
79: L2
80: "x"
81: ]
82: ---
83: T1
84: ------
85: T1
86: ---
87: L2
88: ------
89: ]
90:
91:
92: AAAAUUUUTTTTHHHHOOOORRRR
93: Ralph E. Griswold
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: Version 5.9 The University of Arizona - 6/28/83 2
130:
131:
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.