separate (Tracker.Activity_Pkg.Ac_Delete)
procedure Delete_Ac_Completeness is
    -----------------------------------------------------------------------------
    --|
    --|  NAME: DELETE_AC_COMPLETENESS
    --|
    --|  OVERVIEW:
    --|    This procedure is called when an activity is deleted from the
    --|    activity list.  When an activity is deleted, the element list is
    --|    walked and the activity completeness is deleted in each element
    --|    to account for the missing activity.  Since the activity completeness
    --|    is stored as an array in a field of the element, the array cell
    --|    corresponding to the number of the activity in the activity list
    --|    is deleted.  The remaining array cells are moved up one cell space.
    --|    The number of the cell to be deleted is ac_number.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|
    -----------------------------------------------------------------------------
    End_List : Boolean;
    El_Record : Element_Pointer;

begin
    Start_Walk (El_List);

    loop
        Walk (El_List, El_Record, End_List);
        exit when End_List;

        if Ac_Number = Max_Num_Activities then
            -- last activity
            El_Record.Activity_Completeness (Ac_Number) := ' ';
        else
            -- delete ac from the activty completeness and move the rest up one
            El_Record.Activity_Completeness
               (Ac_Number .. Max_Num_Activities - 1) :=
               El_Record.Activity_Completeness
                  (Ac_Number + 1 .. Max_Num_Activities);
            -- blank out last activity completeness
            El_Record.Activity_Completeness (Max_Num_Activities) := ' ';
        end if;
    end loop;
end Delete_Ac_Completeness;
