November 2010
Intermediate to advanced
504 pages
12h 45m
English
Any Lisp value can be printed with the print or prin1 command. To print a value for humans, without any delimiters, we can use the princ command:
>(prin1 "foo")"foo" >(princ "foo")foo
We can use the ˜s and ˜a control sequences with format to produce the same behavior as prin1 and princ. When used with format, the ˜s control sequence includes appropriate delimiters. The ˜a shows the value, without delimiters, for humans to read:
>(format t "I am printing ˜s in the middle of this sentence." "foo")I am printing "foo" in the middle of this sentence. >(format t "I am printing ˜a in the middle of this sentence." "foo")I am printing foo in the middle of this sentence.
We can adjust the behavior of these ...
Read now
Unlock full access