Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Array-length/Ada/array-length.ada
Normal file
14
Task/Array-length/Ada/array-length.ada
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Array_Length is
|
||||
Fruits : constant array (Positive range <>) of access constant String
|
||||
:= (new String'("orange"),
|
||||
new String'("apple"));
|
||||
|
||||
begin
|
||||
for Fruit of Fruits loop
|
||||
Ada.Text_IO.Put (Integer'Image (Fruit'Length));
|
||||
end loop;
|
||||
|
||||
Ada.Text_IO.Put_Line (" Array Size : " & Integer'Image (Fruits'Length));
|
||||
end Array_Length;
|
||||
Loading…
Add table
Add a link
Reference in a new issue