DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦278df2346⟧ TextFile

    Length: 4090 (0xffa)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

separate (Tracker.Milestone_Pkg)
procedure Ms_Delete is
    -----------------------------------------------------------------------------
    --|
    --|  NAME:  MS_DELETE
    --|
    --|  OVERVIEW:
    --|    This procedure is used to delete a milestone from the list by calling
    --|    the List_Pkg procedure DELETE.  When a milestone is deleted from the
    --|    milestone list, the milestone number must also be changed in every
    --|    element to which it belonged by calling the procedure
    --|    CHANGE_MS_IN_EL.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|
    --|  NOTES:
    --|    The number of milestones is decremented after the record is deleted.
    --|
    --|    A check is made to insure the last milestone is not deleted.  There
    --|    must be at least one milestone at all times.
    --|
    -----------------------------------------------------------------------------

    Abort_Proc : Boolean;           -- abort getting an existing ms
    End_List : Boolean := False;
    Ele_Ptr : Element_Pointer;
    Found : Boolean;           -- parameter to find
    Ms_Record : Milestone_Pointer; -- pointer to milestone record
    New_Ms_Record : Milestone_Pointer; -- pointer to new milestone record
    New_Number : Ms_Num_Type;       -- replacement ms
    Successful : Boolean := False;  -- parameter to delete
    Key : Ms_Num_Type;       -- num of milestone looking for


begin
    if Num_Of_Milestones > 1 then
        -- have to have at least one milestone
        Put_Line
           ("Which milestone would you like to delete? [ give milestone number] ");

        -- get the milestone number
        Prompt_Pkg.Existing_Milstone_Number (Abort_Proc, Key);

        if not Abort_Proc then
            --point to that record in the list
            Find (Ms_List, Key, Ms_Record, Found);

            -- delete the milestone from the list
            Delete (Ms_List, Key, Successful);

            -- check to see if this ms belonged to any elements
            Start_Walk (Ms_Record.Element_List);
            Walk (Ms_Record.Element_List, Ele_Ptr, End_List);

            if not End_List then
                -- change milestone number in element data
                Put (" When milestone ");
                Put (Ms_Record.Number, 1);
                Put (" is deleted, ");
                New_Line;
                Put_Line
                   (" what milestone would you like to use in its place in the element data? ");
                -- prompt for new number

                loop
                    Prompt_Pkg.Existing_Milstone_Number
                       (Abort_Proc, New_Number);
                    exit when not Abort_Proc;
                    Put_Line (" You cannot abort the procedure at this time. ");
                    Put_Line (" You must enter a valid milestone number.");
                    New_Line;
                end loop;

                Find (Ms_List, New_Number, New_Ms_Record, Found);

                -- change the milestone number in the element data
                Change_Ms_In_El (Ms_Record, New_Number);

                -- append these elements to the new milestone's element list
                Start_Walk (Ms_Record.Element_List);

                loop
                    Walk (Ms_Record.Element_List, Ele_Ptr, End_List);
                    exit when End_List;
                    Add (New_Ms_Record.Element_List, Ele_Ptr.Desc_Key, Ele_Ptr);
                end loop;
            end if;

            -- decrement counter
            Num_Of_Milestones := Num_Of_Milestones - 1;

            New_Line;
            Put (" The number of milestones = ");
            Put (Num_Of_Milestones, 1);
            New_Line (2);
            delay 1.0;

        end if; -- not abort

    else
        Put_Line (" You must have at least one milestone at all times. ");
        Put_Line (" Since you only have one milestone at this time, you ");
        Put_Line (" cannot delete it. ");
        delay 2.0;
    end if;
end Ms_Delete;