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

📄 main.adb

📁 Ada 2005 Training Notes.
💻 ADB
字号:
with Random;with Stacks;with Ada.Text_IO;use Ada.Text_IO;procedure Main is   X: Random.Small;   OS1 : Stacks.Object_Stack ;   OS2 : Stacks.Object_Stack ;   OP: Stacks.Object_Class_Ptr;begin   Random.Init(100);   for I in Random.Small'Range loop      X := Random.Next;      Put_Line("Random Next = " & Random.Small'Image(X));   end loop;   OP := new Stacks.Circle;--   OP.X := 0.0;--   OP.Y := 0.0;--   OP.Radius := 1.1;   Stacks.Push(OS1, OP);   Stacks.Push(OS1, OP);   Stacks.Push(OS1, OP);   --   -- Prefixed notation   -- OS1 type is tagged and type'Class class-wide parameter   --   for I in Integer range 1..99 loop      OS1.Push(OP);      OS2.Push(OP);   end loop;   if OS1."="(OS2) then      Put_Line("OS1 is equal to OS2");   else      Put_Line("OS1 is not equal to OS2");   end if;   if OS2."="(OS2) then      Put_Line("OS2 is equal to OS2");   else      Put_Line("OS2 is not equal to OS2");   end if;end Main;

⌨️ 快捷键说明

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