⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 types.adb

📁 This contains the following topics and more ADA versus C and Cplus plus Ada_training ADA 2005 for
💻 ADB
字号:
with Text_IO; use Text_IO;

procedure types is

   type A is new Integer range 1 .. 10; 
   
   -- Derived type [A - 1..10]
   
   --TYPE DISTANCE IS RANGE 1..250;
   
   type B is new A;   -- [B - 1..10]

   subtype sub_A is A range 1 .. A'Last;

   var_A : A := 4;

   var_B : B := 5;

   var_sub_A : sub_A := 4;

   var_INT : Integer := 4;

   x : Integer := 49;
   y : Float;

begin
   x     := Integer (y);
   var_A := A (var_B); -- type casting
   --var_A := var_sub_A;

   --var_A := var_INT;
   --var_A := var_b;

end types;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -