|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 3535 (0xdcf)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Tracker.Element_Pkg)
procedure El_Delete is
-----------------------------------------------------------------------------
--|
--| NAME: EL_DELETE
--|
--| OVERVIEW:
--| This procedure is used to delete an element record. The user is
--| prompted to enter an existing element by a call to the Prompt_Pkg
--| function, which returns a valid key. The element is deleted from
--| each data's element list to which that element belonged. The
--| element is then deleted from the element list by calling the List_pkg
--| procedure DELETE.
--|
--| EXCEPTIONS HANDLED:
--| none
--|
--| HISTORY:
--| written by May Lee March 1985
--|
--| NOTES:
--| The number of elements is decremented if the delete is successful.
--|
--| A check is made to insure the last element is not deleted. There
--| must be at least one element at all times.
--|
-----------------------------------------------------------------------------
Abort_Proc : Boolean := False;
El_Record : Element_Pointer;
Found : Boolean; -- parameter to find
Ms_Record : Milestone_Pointer; -- to delete the element from ms_el_list
Pr_Record : Personnel_Pointer; -- to delete the element from pr_el_list
Ss_Record : Subsystem_Pointer; -- to delete the element from ss_el_list
Successful : Boolean := False;
Key : El_Key_Type; -- element description key
begin
if Num_Of_Elements > 1 then
Put_Line ("Which element would you like to delete? ");
-- get the element description key
Prompt_Pkg.Existing_Ele_Key (Abort_Proc, Key);
if not Abort_Proc then
Find (El_List, Key, El_Record, Found);
-- find the milestone belonging to the deleted element
Find (Ms_List, El_Record.Milestone_Num, Ms_Record, Found);
-- delete the element from the milestone element list
Delete (Ms_Record.Element_List, Key, Successful);
-- find the person belonging to the deleted element
if El_Record.More_Than_One_Person then
-- delete the element from all the personnel lists
for Ac in 1 .. Num_Of_Activities loop
Find (Pr_List, El_Record.People_Initials (Ac),
Pr_Record, Found);
Delete (Pr_Record.Element_List, Key, Found);
end loop;
else
Find (Pr_List, El_Record.Person_Initials, Pr_Record, Found);
Delete (Pr_Record.Element_List, Key, Successful);
end if;
-- find the subsystem belonging to the deleted element
Find (Ss_List, El_Record.Subsystem_Name, Ss_Record, Found);
-- delete from the subsystem element list
Delete (Ss_Record.Element_List, Key, Successful);
-- delete from the element list
Delete (El_List, Key, Successful);
-- decrement the element counter
Num_Of_Elements := Num_Of_Elements - 1;
Put ("Number of elements = ");
Put (Num_Of_Elements);
New_Line;
delay 1.0;
end if; -- if abort, don't do delete
else
Put_Line (" You must have at least one element at all times. ");
Put_Line (" Since you have only one element at this time, you ");
Put_Line (" cannot delete it. ");
delay 2.0;
end if;
end El_Delete;