SET-PRINT-RADIX.html -- ACL2 Version 6.3

## SET-PRINT-RADIX

control printing of the radix for numbers

    Major Section:  IO

See set-print-base for background on how the print base affects the printing of numbers. `set-print-radix` affects whether a radix indicated when a number is printed. The radix is not indicated by default, or after evaluating `(set-print-radix nil state)`. But if `set-print-radix` is called with a first argument that evaluates to a non`nil` value -- for example, `(set-print-radix t state)` -- then the radix is shown when printing. (This behavior is consistent with the handling of Common Lisp global `*print-radix*`.) The following log illustrates how this works.

    ACL2 !>(list 25 25/3)
    (25 25/3)
    ACL2 !>(set-print-base 16 state)
    <state>
    ACL2 !>(list 25 25/3)
    (19 19/3)
    ACL2 !>(set-print-radix t state)
    <state>
    ACL2 !>(list 25 25/3)
    (#x19 #x19/3)
    ACL2 !>(set-print-base 10 state)
    <state>
    ACL2 !>(list 25 25/3)
    (25. #10r25/3)
    ACL2 !>(set-print-radix nil state)
    <state>
    ACL2 !>(list 25 25/3)
    (25 25/3)
    ACL2 !>