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

📄 declare_program_using_function.adb

📁 This contains the following topics and more ADA versus C and Cplus plus Ada_training ADA 2005 for
💻 ADB
字号:
with Text_IO; use Text_IO;with ada.integer_text_io; use ada.integer_text_io;procedure declare_program_using_function is   a : Integer := 99;   b : Integer := 1;   j : Integer := -99;   ret :integer;  package int_io is new Text_IO.Integer_IO (Integer);-- package instantiation   function add (x: in Integer ; y: in Integer ) return integer is  -- procedure      i : Integer := 10;      j : Integer := 10;      k: Integer:=55;   begin      Text_IO.Put("Value of j is = ");      int_io.Put (j);      new_line;      put(j);-- no error bcoz of ada.integer_text_io package      new_line;      declare         k : Integer := 50;      begin         Text_IO.Put ("Value of k inside declare is = ");         int_io.Put (k);new_line;         Text_IO.Put ("accessing the Value of k outside declare is = ");         int_io.Put (add.k);         Text_IO.New_Line;      end;	int_io.Put (j);new_line;      int_io.Put (declare_program_using_function.j);new_line;      return(x+y);   end add;begin    ret := add (a, b);      int_io.Put (ret);     --  int_io.Put (i);end;

⌨️ 快捷键说明

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