Yurttas/PL/IL/Ada-95/F/01/PU/01.html
| ada-95 programming language fundamentals | |
| 1. program units and overall structure |
- Each and every application program in Ada-95 is, at least, one identified procedure and possibly several abstracted procedures with packages.
--
-- date : January 1, 2000.
-- author : Salih Yurttas.
-- purpose : computation of the minimum of a given integer list.
-- minni.adb
with Minimum_of_N_Integers_P; use Minimum_of_N_Integers_P;
procedure Minimum_of_N_Integers is
Max_Size : constant Integer := 16;
Data_Count,
Minimum_Found,
Minimum_Index : Integer;
Data : Integer_List(1..Max_Size);
begin
-- input the list of elements, and
-- count for the number of elements in the given list.
Get_Integer_List(Data_Count,
Data);
-- compute the minimum of Data_Count<=Max_Size integers.
Find_Min_of_Integer_List(Minimum_Found,
Minimum_Index,
Data_Count,
Data);
-- output the minimum found.
Put_Minimum_of_Integer_List(Minimum_Found,
Minimum_Index);
end Minimum_of_N_Integers;
<< | >> contents << | >> flow of control
Dr.Salih Yurttas