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

octal constants don't work AT ALL in the compiler

XMLWordPrintable

    • sparc
    • generic

      It's even worse than I thought.

      Octal constants don't work AT ALL in the compiler.

      I tried

      class junk {
          static public void main(String argv[]) {
      int i = 01;
      int j = 02;
      int k = 0100;
      System.out.println(i + " " + j + " " + k);
          }
      }

      and it printed out "0 0 0"

      This is unacceptable, and in those circumstances that I need to be using octal
      constants, saying that I should use decimal constants instead isn't a reasonable
      workaround.

            ahoffsunw Arthur Hoff (Inactive)
            fyellinsunw Frank Yellin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: