Closed vlad-km closed 1 year ago
CL-USER> (dotimes (i 35)
... (let ((base (+ i 2)))
... (write 40 :base base)
... (if (zerop (mod i 10)) (terpri) (write-char #\space))))
...
101000
1111 220 130 104 55 50 44 40 37 34
31 2c 2a 28 26 24 22 20 1j 1i
1h 1g 1f 1e 1d 1c 1b 1a 19 18
17 16 15 14
CL-USER> (dolist (pb '(2 3 8 10 16))
... (write 10 :base pb :radix t) (terpri))
#B1010
#3r101
#O12
10
#Xa
NIL
CL-USER> (write 10 :stream *standard-output* :radix t :base 11)
#11ra
CL-USER> (with-output-to-string (s)
... (write-string "some text" s)
... (terpri s)
... (terpri s)
... (write-string "more text" s))
"some text\n\nmore text"
CL-USER> (format t "~a" *)
some text
more text
CL-USER> (with-output-to-string (s)
... (write-string "some text" s)
... (fresh-line s)
... (fresh-line s)
... (write-string "more text" s))
"some text\nmore text"
CL-USER> (format t "~a" *)
some text
more text
Why the change from (format t
to (format *standard-output
? Shouldn't it be the same?
If destination is t, the output is sent to standard output.
Looks great, thank you!
*print-base*
,*print-radix*
variableswrite
:(write obj :base 10 :radix t :stream *any-output*)
write-string
:(write-string string *standard-output* :start 2 :end 4)
(write-string string)
(write-string string stream)
(write-string string stream :end 4)
write-line
:(write-line string stream :start 2 :end 3)
(write-line string)
(write-line string stream)
(write-line string stream :end 4)
fresh-line
: `(fresh-line &optional stream)terpri
:(terpri &optional stream)
replace
: (replace seq1 seq2 &key :start1 :end 1 :start2 :end2) seq1 & seq2 must be of the same type,string
orvector
trace
for prevent errorMaximum call stack size exceeded
see Issue #402