Incomprehensible error [closed]

0

I get an error when executing the following code:

   CREATE OR REPLACE PROCEDURE ListaPrimos (n1 IN number, n2 IN number) AS
    metodo number;
BEGIN 
    if n1<n2 
    then
   metodo := n1;
    while (metodo <= n2)
        loop
            if primo(metodo) then 
                dbms_output.putline("metodo");
                else 
                metodo := metodo +1;
            end if;
        end loop;
    end if;
END;
/

The error is as follows:

5/4      PLS-00103: Encountered the symbol "METODO" when expecting one of
         the following:
         . ( * @ % & - + / at mod remainder rem then
         <an exponent (**)> and or || multiset
         The symbol "then" was substituted for "METODO" to continue.

It would be nice if you helped me solve the problem

    
asked by David Egea 12.04.2017 в 12:14
source

1 answer

2

In the

if n1<n2 

you need to put then

In

dbms_output.putline("metodo");

should be

dbms_output.put_line("metodo");
    
answered by 12.04.2017 / 12:18
source