title: Error : PLS-00103: Encountered the symbol "END" when expecting one of the following
body: <p>I wrote the following Package and Package body:</p>
  
  <pre><code>create or replace package discounts
  is
  g_id number := 7839;
  discount_rate number := 0.0;
  procedure display_price(p_price number);
  end;
  /
  create or replace package body discounts
  is
  procedure display_price(p_price number)
  is
    begin
       dbms_output.put_line('Discount rate 1:'||discount_rate); 
       dbms_output.put_line('Discounted '||to_char(p_price * nvl(discount_rate,0)));
       dbms_output.put_line('Discount rate 2:'||discount_rate); 
    end;
  begin
    dbms_output.put_line('Discount rate 3:'||discount_rate); 
    discount_rate := 0.10;
    dbms_output.put_line('Discount rate 4:'||discount_rate); 
  end;
  /
  </code></pre>
  
  <p>It is written that "The value of discount_rate is set to 0.10 when the package is invoked for the first time in a session". I am not getting this point exactly that's why I checked the value each time of discount rate. I typed the following to invoke:</p>
  
  <pre><code>SQL&gt; execute discounts.display_price(1000);
  Discount rate 3:0
  Discount rate 4:.1
  Discount rate 1:.1
  Discounted 100
  Discount rate 2:.1
  </code></pre>
  
  <p>Then again I invoked the variable:</p>
  
  <pre><code>  begin
      dbms_output.put_line('Discount rate :'||discounts.discount_rate);
    end;
    SQL&gt; /
    Discount rate :.1
  </code></pre>
  
  <p>Then I typed "exit" to close the SQL *PLUS. Again I opened SQL *PLUS and typed the same code:</p>
  
  <pre><code>  begin
      dbms_output.put_line('Discount rate :'||discounts.discount_rate);
    end;
  </code></pre>
  
  <p>I thought it will not initialize the variable but I got the error:</p>
  
  <pre><code>  ERROR at line 3:
    ORA-06550: line 3, column 1:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    := . ( % ;
    The symbol ";" was substituted for "END" to continue.
  </code></pre>
  
  <p>What is the mistake ? I am new to PL/SQL preparing for certification exam.</p>