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

📄 attributes_main.adb.npp

📁 This contains the following topics and more ADA versus C and Cplus plus Ada_training ADA 2005 for
💻 NPP
字号:
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 + -