How things are printed on the screen is mostly implementation dependent,but here is what I do in such cases.
The following function shows the values of all Common Lisp variables that have anything to do with printing:
Code: Select all
(defun printer-status ()
(format t ";; *print-array* = ~a~%" *print-array*)
(format t ";; *print-base* = ~a~%" *print-base*)
(format t ";; *print-case* = ~a~%" *print-case*)
(format t ";; *print-circle* = ~a~%" *print-circle*)
(format t ";; *print-escape* = ~a~%" *print-escape*)
(format t ";; *print-gensym* = ~a~%" *print-gensym*)
(format t ";; *print-length* = ~a~%" *print-length*)
(format t ";; *print-level* = ~a~%" *print-level*)
(format t ";; *print-lines* = ~a~%" *print-lines*)
(format t ";; *print-miser-width* = ~a~%" *print-miser-width*)
(format t ";; *print-pprint-dispatch* = ~a~%" *print-pprint-dispatch*)
(format t ";; *print-pretty* = ~a~%" *print-pretty*)
(format t ";; *print-radix* = ~a~%" *print-radix*)
(format t ";; *print-readably* = ~a~%" *print-readably*)
(format t ";; *print-right-margin* = ~a~%" *print-right-margin*))
Here are the SBCL default values, right after SBCL was started:
Code: Select all
CL-USER> (printer-status)
;; *print-array* = T
;; *print-base* = 10
;; *print-case* = UPCASE
;; *print-circle* = NIL
;; *print-escape* = T
;; *print-gensym* = T
;; *print-length* = NIL
;; *print-level* = NIL
;; *print-lines* = NIL
;; *print-miser-width* = NIL
;; *print-pprint-dispatch* = #<PPRINT-DISPATCH-TABLE {10001C3633}>
;; *print-pretty* = T
;; *print-radix* = NIL
;; *print-readably* = NIL
;; *print-right-margin* = NIL
Often it helps to set
*PRINT-PRETTY* to NIL, or at least this is the very first thing I would try. Other candidates are
*PRINT-RIGHT-MARGIN* and
*PRINT-MISER-WIDTH*, if they are not set to NIL (what means they are ignored).
Most Common Lisp implementations have default values for 80 characters per line, what is the line length of most terminal screens.
If that doesn't help I would need to know the name of the Common Lisp implementation you work with.
anaumov wrote:I would like to have ONE string.
To get the value of L as ONE
STRING you need to write:
Code: Select all
(format nil "~a" L) => "(AAAAAAAAA# BBBBBBBBB# CCCCCCCCC# DDDDDDDDD# EEEEEEEEE# FFFFFFFFF# GGGGGGGGGG#)"
or maybe something like this:
Code: Select all
(format nil "~{~a~}" L) => "AAAAAAAAA#BBBBBBBBB#CCCCCCCCC#DDDDDDDDD#EEEEEEEEE#FFFFFFFFF#GGGGGGGGGG#"
- edgar