Non-decimal radices/Convert: Difference between revisions

(→‎{{header|C}}: overflow; correct string length; output)
Line 309:
 
=={{header|Common Lisp}}==
<lang lisp>(let ((*printparse-base*integer "1a" :radix 16) ; returns multiple values: 26, 2
*read-base* 16))
(write-to-string 26) ; returns the string "1A"
(read-from-string "1a") ; returns the integer 26
 
(write-to-string 26 :base 16) ; also "1A"</lang>
 
Anonymous user