> r
...@rpw3.org (Rob Warnock) writes:
>> Tim Johnson <t...@johnsons-web.com> wrote:
>> +---------------
>> | I could just use to pointers to URLs or docs on these symbols.
>> +---------------
>> First go find some version of the CLHS ("Common Lisp HyperSpec"), e.g.:
>> http://www.lispworks.com/reference/HyperSpec/Front/index.htm
>> Then click on the "Master Index" icon, then on the "Non-Alphabetic"
>> link, and browse the left-most character on each line.
>> But before you do that, you might find it more helpful to obtain a
>> somewhat higher-level view of the Common Lisp reader:
>> http://www.lispworks.com/documentation/HyperSpec/Body/02_b.htm
>> 2.2 Reader Algorithm
> Then have a play at the REPL
> #' and ' are abbreviations, but the data denoted by the
> abbreviations are printed out in using abbreviations, so you
> cannot see what they are abbreviations for. Turning off the
> pretty printer with :pretty nil gets round this.
> CL-USER> (defparameter form (read))
> (#'(setf foo) `(this that))
> FORM
> CL-USER> (write form :pretty nil)
> ((FUNCTION (SETF FOO)) (QUOTE (THIS THAT)))
> (#'(SETF FOO) '(THIS THAT))
> Some input needs to be accompanied by escape characters to
> stop it being processed in the default manner. When the
> input is printed out again, the printer adds the escape
> characters back in. This is good because it permits
> round-tripping: you can print things out and read them back
> in. This is bad because you cannot see your actual input: it
> comes out decorated with escape characters. Turning off the
> escaping with :escape nil helps you see what is going on.
> CL-USER> (defparameter strings-and-symbols (read))
> ("ab\"cd" |foo| foo)
> STRINGS-AND-SYMBOLS
> CL-USER> (write strings-and-symbols :escape nil)
> (ab"cd foo FOO)
> ("ab\"cd" |foo| FOO)
> Alan Crowe
> Edinburgh
> Scotland
--