title: Why does passing fields between Oracle procedures lose the sizes?
body: <p>Here's a simple proc which defines 2 numeric fields, 1 as a Number, the other as Decimal, yet when I pass both to another procedures the decimal field is rounded to 0 dp, ie </p>
  
  <p>IAMOUNT ends up with 9875.4321 but IUNITS ends up with 123</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE apex_public_user.badbdcall2
  AS
    iamount NUMBER(15, 7);
    iunits  DECIMAL(15, 7);
    BEGIN
      iamount := 9875.4321;
      iunits := 123.567;
  
      BEGIN
        BADBDCALL2CALLME(
           IAMOUNT =&gt; iamount,
           IUNITS =&gt; iunits
        );
      END;
    END;
  </code></pre>
  
  <p>The receiving SQL:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE badbdcall2callme(iamount IN OUT DECIMAL,
                                               iunits  IN OUT DECIMAL)
  AS
    in_ds1 bde1000ds%ROWTYPE;
    BEGIN
      in_ds1.iamount := iamount;
      in_ds1.iunits := iunits;
    END;
  </code></pre>
  
  <p>If I debug the code, I can see that IUNITS becomes 38,0 which is the default for a decimal and IAMOUNT becomes a NUMBER (with out the 15,7), but I thought that parameters inherited the size of the field passed to it.</p>