Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
16
Task/Array-length/Ada/array-length.adb
Normal file
16
Task/Array-length/Ada/array-length.adb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with System;
|
||||
|
||||
procedure Array_Length is
|
||||
|
||||
Fruits : constant array (Positive range <>) of access constant String
|
||||
:= (new String'("orange"),
|
||||
new String'("apple"));
|
||||
|
||||
Memory_Size : constant Integer := Fruits'Size / System.Storage_Unit;
|
||||
|
||||
begin
|
||||
Put_Line ("Number of elements : " & Fruits'Length'Image);
|
||||
Put_Line ("Array memory Size : " & Memory_Size'Image & " bytes" );
|
||||
Put_Line (" " & Integer'Image (Memory_Size * System.Storage_Unit / System.Word_Size) & " words" );
|
||||
end Array_Length;
|
||||
Loading…
Add table
Add a link
Reference in a new issue