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

📄 attributes_main.adb

📁 This contains the following topics and more ADA versus C and Cplus plus Ada_training ADA 2005 for
💻 ADB
字号:
with Ada.Text_IO;         use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Float_Text_IO;   use Ada.Float_Text_IO;
procedure attributes_Main is
begin
   --range of integer along with the bit length
   Put ("Smallest Integer ");
   Put (Integer'Image (Integer'First));
   New_Line;

   Put ("Largest Integer ");
   Put (Integer'Image (Integer'Last));
   New_Line;

   Put ("Largest long Integer ");
   Put (Long_Integer'Image (Long_Integer'Last));
   New_Line;

   Put ("Largest long long Integer ");
   Put (Long_Long_Integer'Image (Long_Long_Integer'Last));
   New_Line;

   Put ("Integer(bits) ");
   Put (Integer'Image (Integer'Size));
   New_Line;
   -- bits returns the size in bits of an integer object

   Put ("Integer(digits) ");
   Put (Integer'Image (Float'Digits));
   -- digits returns the precision in decimal digits of a number stored in a
   --integer object
   New_Line;
   Put ("long_Integer(digits) ");
   Put (Long_Integer'Image (Long_Float'Digits));
   New_Line;
   New_Line;
   New_Line;
   New_Line;
   New_Line;

   --range of Float along with the bit length
   Put ("smallest Float ");
   Put (Float'Image (Float'First));
   New_Line;

   Put ("Largest Float ");
   Put (Float'Image (Float'Last));
   New_Line;

   Put ("Largest long float ");
   Put (Long_Float'Image (Long_Float'Last));
   New_Line;

   Put ("Largest long long Integer ");
   Put (Long_Long_Float'Image (Long_Long_Float'Last));
   New_Line;

   Put ("Float(bits)");
   Put (Integer'Image (Float'Size));
   New_Line;
   -- bits returns the size in bits of an float object
   Put ("Float (digits)");
   Put (Integer'Image (Float'Digits));
   New_Line;
   -- digits returns the precision in decimal digits of a number stored in a
   --float object
   Put ("long_float(digits) ");
   Put (Long_Integer'Image (Long_Float'Digits));
   New_Line;
end attributes_Main;

⌨️ 快捷键说明

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