Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8292981

Unify and restructure integer printing format specifiers

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b14

      Today we have some inconsistencies in how we name our integer printing format specifiers. I'd like to change this to be consistent.

      Current suggestion:

      // Guide to the suffixes used in the format specifiers for integers:
      // - print the decimal value: 745565
      // _X - print as hexadecimal, without leading 0s: 0x12345
      // _X_0 - print as hexadecimal, with leading 0s: 0x00012345
      // _H - print as hexadecimal, without 0x prefix
      // _W(w) - prints w sized string with the given value right
      // adjusted. Use -w to print left adjusted.
      //
      // Note that the PTR format specifiers print using 0x with leading zeros,
      // just like the _X_0 version for integers.

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: