| | 1 | = The Inspector = |
| | 2 | |
| | 3 | CCL has an inspector, an interactive tool to let you look at, and in |
| | 4 | some cases modify, Lisp objects. To inspect a Lisp object, call the |
| | 5 | function INSPECT on the object. This displays the object, showing its |
| | 6 | contents as a sequence of numbered "items". If there are a lot of |
| | 7 | items (e.g. a large array) , they're displayed in "pages", i.e. groups |
| | 8 | that you can scroll up and down through. (Each "page" is 20 lines.) |
| | 9 | |
| | 10 | It enters a read-eval-print loop that understands the following |
| | 11 | top-level commands: |
| | 12 | |
| | 13 | === {{{(:i N)}}} === |
| | 14 | Inspect the N'th item, entering the inspector recursively. |
| | 15 | |
| | 16 | === {{{:pop}}} === |
| | 17 | Exit the current inspector level. |
| | 18 | |
| | 19 | === {{{:show}}} === |
| | 20 | Show (display) the object being inspected, again. |
| | 21 | |
| | 22 | === {{{:next}}} === |
| | 23 | Show next "page" of the object |
| | 24 | |
| | 25 | === {{{:prev}}} === |
| | 26 | Show previous "page" of the object |
| | 27 | |
| | 28 | === {{{:home}}} === |
| | 29 | Show first "page" of the object |
| | 30 | |
| | 31 | === {{{(:s N V)}}} === |
| | 32 | Set the value of the N'th item to V, where that can be done. |
| | 33 | |
| | 34 | |
| | 35 | If you type in an ordinary Lisp form, it is evaluated and printed. |
| | 36 | The variable {{{ccl::@}}} is bound to the object being inspected. |
| | 37 | |
| | 38 | In the {{{:i}}} and {{{:s}}} commands, N is not evaluated, and in the {{{:s}}} command, |
| | 39 | V is not evaluated. (You can use the {{{#.}}} reader macro if you do |
| | 40 | want to get something evaluated in those positions.) |
| | 41 | |