class AdLint::Cc1::PrintfFormat::Conversion_a

Public Class Methods

suitable_conversion_specifier_character() click to toggle source
# File lib/adlint/cc1/format.rb, line 1198
def self.suitable_conversion_specifier_character
  "a"
end

Private Instance Methods

default_precision_value() click to toggle source
# File lib/adlint/cc1/format.rb, line 1203
def default_precision_value
  # NOTE: The ISO C99 standard says;
  #
  # 7.19.6.1 The fprintf function
  #
  # 8 The conversion specifiers and their meanings are:
  #
  #   a,A     A double argument representing a floating-point number is
  #           converted in the style [-]0xh.hhhhp[+-]d, where there is
  #           one hexadecimal digit (which is nonzero if the argument is
  #           a normalized floating-point number and is otherwise
  #           unspecified) before the decimal-point character and the
  #           number of hexadecimal digits after it is equal to the
  #           precision; if the precision is missing and FLT_RADIX is a
  #           power of 2, then the precision is sufficient for an exact
  #           representation of the value; if the precision is missing
  #           and FLT_RADIX is not a power of 2, then the precision is
  #           sufficient to distinguish values of type double, except
  #           that trailing zeros may be omitted; if the precision is
  #           zero and the # flag is not specified, no decimal-point
  #           character appears.  The letters abcdef are used for a
  #           conversion and the letters ABCDEF for A conversion.  The A
  #           conversion specifier produces a number with X and P instead
  #           of x and p.  The exponent always contains at least one
  #           digit, and only as many more digits as necessary to
  #           represent the decimal exponent of 2.  If the value is zero,
  #           the exponent is zero.

  # FIXME: This is not the ISO C99 compliant.
  6
end