your_name.adb

来自「This contains the following topics and m」· ADB 代码 · 共 23 行

ADB
23
字号
with Ada.Text_IO; use Ada.Text_IO;  -- a package containing the"put_line"
                                    --procedure
procedure your_name is

   procedure hello is    -- candidate for the "main" procedure.
   begin
      Put_Line ("hello");
   end hello;

   name  : String (1 .. 100);    -- 100 character array
   first : Natural;     -- can only contain natural integers
begin
   Put ("Hello what is your name? ");
   Get_Line (name, first);
   for i in  1 .. 10 loop  --integer'first loop 	-- i is implicity declared as
                           --integer

      Put_Line (" sai " & name (1 .. first));
      -- & string concatenation
      -- name(1..last)- array slice
   end loop;     -- control structure labelled
end your_name;

⌨️ 快捷键说明

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