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

📄 swap.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, Ada.Integer_Text_Io;-- Ada.Swap;
use Ada.Text_Io, Ada.Integer_Text_Io;
procedure Main is
Books_Room_1 : Integer;
   Books_Room_2 : Integer;
    procedure swap (First : in out Integer; Second : in out Integer) is
     Temp : Integer;
   begin
      Temp   := First;
      First  := Second;
      Second := Temp;
 end swap;
begin
Books_Room_1 := 10; Books_Room_2 := 20;
Put("Books in room 1 ="); Put(Books_Room_1); New_Line;
Put("Books in room 2 ="); Put(Books_Room_2); New_Line;
Put("Swap around"); New_Line;
Swap(Books_Room_1, Books_Room_2);
Put("Books in room 1 ="); Put(Books_Room_1); New_Line;
Put("Books in room 2 ="); Put(Books_Room_2); New_Line;
end Main;


⌨️ 快捷键说明

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