002:Ada自定义类型

-- putwage.adb
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Putwage is
   subtype Age is Integer range 1 .. 100;
   subtype Wage is Integer;
   Bill_Age : Age :=56;
   Bill_Wage : Wage :=56;
begin Put (" Total Wage Is ");
   Put(Integer(Bill_Wage)*Integer(Bill_Age));
   New_Line;
end Putwage;
发布了69 篇原创文章 · 获赞 33 · 访问量 1175

猜你喜欢

转载自blog.csdn.net/dosdiosas_/article/details/105717068