我已經展示了下面這兩個文件有沒有區別?
A1.ada
procedure KOR616 is
I : Integer := 3;
procedure Lowest_Level(Int : in out Integer);
pragma Inline(Lowest_Level);
procedure Null_Proc is
begin
null;
end;
procedure Lowest_Level(Int : in out Integer) is
begin
if Int > 0 then
Int := 7;
Null_Proc;
else
Int := Int + 1;
end if;
end;
begin
while I < 7 loop
Lowest_Level(I);
end loop;
end;
下一步兩個ADA文件如下所示是B1.ada
procedure Lowest_Level(Int : in out Integer);
pragma Inline(Lowest_Level);
procedure Lowest_Level(Int : in out Integer) is
procedure Null_Proc is
begin
null;
end;
begin
if Int > 0 then
Int := 7;
Null_Proc;
else
Int := Int + 1;
end if;
end Lowest_Level;
with Lowest_Level;
procedure KOR618 is
I : Integer := 3;
begin
while I < 7 loop
Lowest_Level(I);
end loop;
end;
有沒有這兩個文件之間有什麼區別?
重新格式化的代碼;如果不正確請回復。 – trashgod 2010-06-22 16:37:40