I have found some code with conditional compilation and I'm trying to figure the usage of it.
Let's assume we have the following:
create or replace package pkg_global_params as
global_1 constant boolean default TRUE;
global_2 constant boolean default TRUE;
end;
create or replace procedure test_cond_comp1 as
begin
if pkg_global_params.global_1 then
dbms_output.put_line('In');
else
dbms_output.put_line('Out');
end if;
end;
create or replace procedure test_cond_comp1_cond as
begin
$if pkg_global_params.global_1 $then
dbms_output.put_line('In');
$else
dbms_output.put_line('Out');
$end
end;
What is the difference with these 2 procedures. I could not find any difference. They both get uncompiled when I change the constant global_1 and none gets uncompiled when I change the global_2.
I read a lot of code but I could not understand what is the different with procedure test_cond_comp1 and procedure test_cond_comp1_cond.
Can someone explain?