• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
          • Fmt
          • Msg
          • Cw
          • Set-evisc-tuple
          • Set-iprint
          • Print-control
          • Read-file-into-string
          • Std/io
          • Msgp
          • Printing-to-strings
          • Evisc-tuple
          • Output-controls
          • Observation
          • *standard-co*
          • Standard-co
          • Ppr-special-syms
          • Standard-oi
          • Without-evisc
          • Serialize
          • Fmt-to-comment-window
          • Output-to-file
          • Princ$
          • Character-encoding
          • Open-output-channel!
          • Cw-print-base-radix
            • Set-print-case
            • Set-print-base
            • Print-object$
            • Extend-pathname
            • Print-object$+
            • Fmx-cw
            • Set-print-radix
            • Set-fmt-hard-right-margin
            • File-write-date$
            • Proofs-co
            • Set-print-base-radix
            • Print-base-p
            • *standard-oi*
            • Wof
            • File-length$
            • Fms!-lst
            • Delete-file$
            • *standard-ci*
            • Write-list
            • Trace-co
            • Fmt!
            • Fms
            • Cw!
            • Fmt-to-comment-window!
            • Fms!
            • Eviscerate-hide-terms
            • Fmt1!
            • Fmt-to-comment-window!+
            • Read-file-into-byte-array-stobj
            • Fmt1
            • Fmt-to-comment-window+
            • Cw-print-base-radix!
            • Read-file-into-character-array-stobj
            • Fmx
            • Cw!+
            • Read-objects-from-book
            • Newline
            • Cw+
            • Probe-file
            • Write-objects-to-file!
            • Write-objects-to-file
            • Read-objects-from-file
            • Read-object-from-file
            • Read-file-into-byte-list
            • Set-fmt-soft-right-margin
            • Read-file-into-character-list
            • Io-utilities
          • Defpkg
          • Apply$
          • Loop$
          • Programming-with-state
          • Arrays
          • Characters
          • Time$
          • Defconst
          • Fast-alists
          • Defmacro
          • Loop$-primer
          • Evaluation
          • Guard
          • Equality-variants
          • Compilation
          • Hons
          • ACL2-built-ins
          • Developers-guide
          • System-attachments
          • Advanced-features
          • Set-check-invariant-risk
          • Numbers
          • Efficiency
          • Irrelevant-formals
          • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
          • Redefining-programs
          • Lists
          • Invariant-risk
          • Errors
          • Defabbrev
          • Conses
          • Alists
          • Set-register-invariant-risk
          • Strings
          • Program-wrapper
          • Get-internal-time
          • Basics
          • Packages
          • Oracle-eval
          • Defmacro-untouchable
          • <<
          • Primitive
          • Revert-world
          • Unmemoize
          • Set-duplicate-keys-action
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Fake-oracle-eval
          • Defopen
          • Sleep
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Io
    • ACL2-built-ins

    Cw-print-base-radix

    Print to the comment window in a given print-base

    See cw for relevant background. This variant of cw requires specification of a print-base and, optionally, a print-radix (see set-print-base, set-print-radix, and set-print-base-radix).

    The following examples show that cw-print-base-radix is just like cw, except that there is a new argument in the first position that specifies the print-base and can, for that print-base, override the default print-radix.

    ACL2 !>(cw-print-base-radix 16 "~x0~%" '(3 12 16 17))
    (#x3 #xC #x10 #x11)
    NIL
    ACL2 !>(cw-print-base-radix '(16 . t) "~x0~%" '(3 12 16 17))
    (#x3 #xC #x10 #x11)
    NIL
    ACL2 !>(cw-print-base-radix '(16 . nil) "~x0~%" '(3 12 16 17))
    (3 C 10 11)
    NIL
    ACL2 !>(cw-print-base-radix 10 "~x0~%" '(3 12 16 17))
    (3 12 16 17)
    NIL
    ACL2 !>(cw-print-base-radix '(10 . t) "~x0~%" '(3 12 16 17))
    (3. 12. 16. 17.)
    NIL
    ACL2 !>(cw-print-base-radix '(10 . nil) "~x0~%" '(3 12 16 17))
    (3 12 16 17)
    NIL
    ACL2 !>
    
    General Forms:
    
    (cw-print-base-radix print-base fmt-string arg1 arg2 ... argn)
    (cw-print-base-radix print-base/print-radix fmt-string arg1 arg2 ... argn)

    where all arguments of this macro are evaluated; print-base is a legal print-base as recognized by print-base-p; print-base/print-radix is a cons whose car is a legal print-base; fmt-string is a string suitable for passing to fmt; and arg1 through argn (where n is at most 9) are corresponding arguments for fmt-string. Printing is done according to the specified print-base, which is the first argument in the first general form and is the car of the first argument in the second general form. The print-radix value that is used for printing in the first general form is the print-radix as specified for set-print-base-radix, while in the second general form, it is the cdr.