title: Order of declaration in an anonymous pl/sql block
body: <p>I have an anonymous pl/sql block with a procedure declared inside of it as well as a cursor.  If I declare the procedure before the cursor it fails.  Is there a requirement that cursors be declared prior to procedures?</p>
  
  <p>What other rules are there for order of declaration in a pl/sql block?</p>
  
  <p>This works:</p>
  
  <pre><code>DECLARE
   cursor cur is select 1 from dual;
   procedure foo as begin null; end foo;
  BEGIN
   null;
  END;
  </code></pre>
  
  <p>This fails with error <code>PLS-00103: Encountered the symbol "CURSOR" when expecting one of the following: begin function package pragma procedure form</code></p>
  
  <pre><code>DECLARE
   procedure foo as begin null; end foo;
   cursor cur is select 1 from dual;
  BEGIN
   null;
  END;
  </code></pre>