title: Oracle PL/SQL: assign a new value to an IN variable
body: <p>I have a procedure defined as:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE foo (
    AS_OF_DATE_IN IN DATE DEFAULT TRUNC(sysdate)-1
  ) AS ...
  </code></pre>
  
  <p>Which can be executed in these manners:</p>
  
  <pre><code>-- passes '11-NOV-2011'
  exec foo('11-NOV-2011');
  
  --set DEFAULT value (yesterday's date)
  exec foo();
  
  --makes things more difficult, as default value isn't set
  exec foo(NULL);
  </code></pre>
  
  <p>What I want to do is:</p>
  
  <pre><code>AS_OF_DATE_IN:=NVL(AS_OF_DATE_IN, TRUNC(sysdate)-1);
  </code></pre>
  
  <p>but it generates a reassignment error.</p>
  
  <p>Other than wrapping all usages of AS_OF_DATE_IN with NVL(), is there a more-efficient way to handle this situation?</p>
  
  <p>** edit **
  I made a fairly stupid mistake--I'm writing a procedure, not a function.  The procedure doesn't return a value.</p>