separate (Tracker.Element_Pkg)
procedure El_Save is
    -----------------------------------------------------------------------------
    --|
    --|  NAME:  EL_SAVE
    --|
    --|  OVERVIEW:
    --|    This procedure saves a record to file by calling the EL_WRITE
    --|    procedure.  The user is first asked which date of completion
    --|    to save to determine which date to write to the file.  The generic
    --|    procedures START_WALK and WALK are called to walk the linked list
    --|    allowing one record at a time to be written.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|
    -----------------------------------------------------------------------------
    A_Char : Character := ' ';  -- input character y or n
    El_Record : Element_Pointer;   -- pointer to the element record
    End_List : Boolean := False;  -- parameter to WALK
    Update : Boolean := True;   -- update the previous date of completion

    procedure El_Write is separate;

begin
    Start_Walk (El_List);
    -- find out which data to write to the file

    loop
        Put_Line
           (" Do you want to update the previous date of completion with the ");
        Put_Line (" newly computed date of completion?");
        Put (" [Y or N, <cr>=Y] : ");

        if End_Of_Line then
            Skip_Line;
            exit;
        else
            Get (A_Char);
            Skip_Line;

            if A_Char = 'N' or A_Char = 'n' then
                Update := False;
                exit;
            elsif A_Char = 'Y' or A_Char = 'y' then
                exit;
            else
                New_Line;
                Put_Line
                   (" When the data is written to the file for the next run of TRACKER,");
                Put_Line
                   (" which set of element completion dates would you like stored in the ");
                Put_Line
                   (" 'Previous Completion Date' column, the previous completion date ");
                Put_Line
                   (" used in this run or the newly computed completion date? ");
                New_Line;
            end if;
        end if;
    end loop;

    New_Line (2);

    -- walk the list one element at a time and write it to the file
    loop
        Walk (El_List, El_Record, End_List);
        exit when End_List;
        El_Write;
    end loop;
end El_Save;