create or replace package test_package is
procedure pro_test01(num_arg in number);
function fun_test02 return number;
end test_package;
create or replace package body test_package is
procedure pro_test01(num_arg in number) is
begin
dbms_output.put_line(num_arg);
end;
function fun_test02 return number
is num_sum number default 0;
begin
for i in 1..100 loop
num_sum := num_sum + i;
end loop;
return num_sum;
end;
end test_package;
declare
num_sum number(10);
begin
num_sum := test_package.fun_test02;
dbms_output.put_line('num_sum' || num_sum);
test_package.pro_test01(num_sum);
end;