Page 346 | Table of Contents | Index | Page 348 |
Chapters | |||
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 A, B, C, D, E |
(defgeneric output-record-position (record) (declare (values x y))) (defgeneric* (setf output-record-position) (x y record)) (defmethod output-record-position ((record sample-output-record)) (with-slots (x y) (values x y))) (defmethod* (setf output-record-position) (nx ny (record sample-output-record)) (with-slots (x y) (setf x nx y ny)))The position of such an output record could then be changed as follows:
(setf (output-record-position record) (values nx ny)) (setf (output-record-position record1) (output-record-position record2))
Page 346 | Table of Contents | Index | Page 348 |
Chapters | |||
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 A, B, C, D, E |