*print-radix* controls whether Clojure prints radix prefixes when numbers use non-decimal bases. It works with *print-base* during pretty printing. section 23.20
It prints these prefixes for supported bases:
- #b for base 2, binary. section 23.20
- #o for base 8, octal. section 23.20
- #x for base 16, hexadecimal. section 23.20
Making hexadecimal output self-identifying
(binding [pprint/*print-base* 16 pprint/*print-radix* true] (pprint/pprint 3405691582)) ;; #xcafebabe section 23.20
Table 23.1. The dynamic variables related to pretty printing
| Name |
Namespace |
Default |
Description |
|
|
|
true |
Print escape sequences literally. |
|
|
|
false |
Print objects so they can be read back into memory. |
|
|
|
nil |
Number of items to print in a collection. |
|
|
|
nil |
Number of nesting collections level to print. |
|
|
|
false |
Should metadata be printed as part of the object. |
|
|
|
true |
Enable/disable pretty printing. |
|
|
|
fn |
Set pretty printer dispatch function. |
|
|
|
72 |
Number of columns to use before breaking into a newline. |
|
|
|
40 |
The column at which to enter miser style. |
|
|
|
nil |
Remove namespace qualifier from symbols. |
|
|
|
nil |
Print radix used for integers or ratio. |
|
|
|
10 |
Change base for printing integers or ratio. |
Compare *print-radix* with related dynamic variables that control readability, collection limits, metadata, and pretty-printing behavior. section 23.20
