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

📄 main.adb

📁 Ada 2005 Training Notes.
💻 ADB
字号:
with PrefixedNotation;procedure Main is   type T is record      I: Integer;   end record;   type A1 is access all T;   Ref1: A1;   procedure P(Ptr: access T) is      type A2 is access all T;      Ref2: A2;   begin      -- raised PROGRAM_ERROR : main.adb:15 accessibility check failed      -- Ptr's scope is in procedure P and Ref1's scope is longer then A1's.      Ref1 := A1(Ptr);      -- Ptr's scope is the same as A2's scope and has the same life duration      Ref2 := A2(Ptr);   end P;X1: aliased T;begin   declare      X2: aliased T;   begin      P(X1'Access);      P(X2'Access);   end;end Main;--procedure Main is--   Var : PrefixedNotation.T;--begin--   -- Subprogram first--   PrefixedNotation.P(X => Var);--   -- Object first--   Var.P;----   Main;--end Main;

⌨️ 快捷键说明

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