Issue FORMAT-RADIX-NONINTEGER
Issue: FORMAT-RADIX-NONINTEGER

Forum: Editorial

References: Section 22.3.1 of the ANSI CL specification

Category: CLARIFICATION/CHANGE

Edit History: 2004-08-01, version 1 created by Paul Dietz

Status: For CLiki consideration

Problem Description:

The ~D format directive is indicated to act like ~A with decimal printing when the argument is not an integer. The ~R, ~B, ~O, and ~X are described as acting like ~D, but it is not stated specifically that they do the same. Also, it is not clear if the common format parameters between ~D and ~A are passed along to ~A (but see the page for ~F, which implies that the width parameter does get passed along from ~D to ~A.)

Proposal (FORMAT-RADIX-NONINTEGER:UNIFY)

Make ~R, ~B, ~O, and ~X be consistent with ~D on non-integer arguments. In this situation, ~B, ~O, and ~X should bind *PRINT-BASE* to 2, 8, or 16 (respectively) then invoke ~A on the argument. ~R should bind *PRINT-BASE* to the radix parameter (if present) and invoke ~A. All of these (and ~D) should invoke ~A with the specified mincol and padchar parameters, if they are present, and ignore commachar and comma-interval.

Test case:

Rationale:

This seems to be the consistent thing to do.

Current practice:

Cost to Implementors:

Cost to Users:

None.

Cost of Non-Adoption:

Benefits:

Increased consistency.

Aesthetics:

Discussion:
  • Bruno Haible supports UNIFY.