-------------------------------------------------------------------------------
-- ex_pl_sqldyn_variante_function.sql 
-------------------------------------------------------------------------------

-- variante moins bien appel fonction

create or replace function f(x integer) return integer is
begin
    return x + 1 ;
end;
/

create or replace procedure p is
    x integer;
    y integer;
begin
    x := 10;
    execute immediate 'call f(:1) into :2' using in x, out y;
    dbms_output.put_line(y);
end;
/

exec p; 
-- 11

-------------------------------------------------------------------------------
-- certains de ces codes ont utilise des codes de Sophie Laplante, 2006 et 2007
-------------------------------------------------------------------------------
