| Class | Lisp::Format::Directives::Radix |
| In: |
lib/facet/lisp-format.rb
|
| Parent: | Directive |
Represents the ~R (Radix) directive. This outputs numbers in a given radix, or using alternative forms, such as Roman numerals or cardinal/ordinal English numbers.
Output the given argument using one of a variety of methods. Either the argument is output using a specific radix, using cardinal or ordinal English numbers, or Roman numerals. The full form is
~radix,mincol,padchar,commachar,commainterval:@R
with the same interpretation as for ~D (Decimal / Number), but using the given radix instead. An ArgumentError is raised if the argument is not an integer, or, in the case of Roman numerals, if the argument is not a Fixnum value.
If none of the parameters are given the output instead depends on the combination of modifiers:
An ArgumentError is raised if the argument is not an integer.