![[LISPWORKS]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fLWSmall.gif&f=jpg&w=240)
![[Common Lisp HyperSpec (TM)]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fCLHS_Sm.gif&f=jpg&w=240)
Value Type:
aradix.
Initial Value:
10.
Description:
Controls the interpretation of tokens byread as beingintegers orratios.
Thevalue of*read-base*, called thecurrent input base, is the radix in whichintegers andratios are to be read by theLisp reader. The parsing of other numerictypes (e.g.,floats) is not affected by this option.
The effect of*read-base* on the reading of any particularrational number can be locally overridden by explicit use of the#O,#X,#B, or#nR syntax or by a trailing decimal point.
Examples:
(dotimes (i 6) (let ((*read-base* (+ 10. i))) (let ((object (read-from-string "(\\DAD DAD |BEE| BEE 123. 123)"))) (print (list *read-base* object)))))>> (10 (DAD DAD BEE BEE 123 123))>> (11 (DAD DAD BEE BEE 123 146))>> (12 (DAD DAD BEE BEE 123 171))>> (13 (DAD DAD BEE BEE 123 198))>> (14 (DAD 2701 BEE BEE 123 227))>> (15 (DAD 3088 BEE 2699 123 258))=> NIL
Affected By: None.
See Also: None.
Notes:
Altering the input radix can be useful when reading data files in special formats.