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

⟦f55958579⟧ TextFile

    Length: 3438 (0xd6e)
    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.Activity_Pkg)


procedure Ac_Delete is
    ------------------------------------------------------------------------------
    --|
    --|  NAME:  AC_DELETE
    --|
    --|  OVERVIEW:
    --|    This procedure is used to delete a record from the list by calling
    --|    the generic procedure DELETE.  The user is prompted for an existing
    --|    activity to delete by a call to Prompt_pkg.  When an activity is
    --|    deleted, its completeness information, which is stored as a field
    --|    in the element record, must also be deleted by calling the
    --|    procedure DELETE_AC_COMPLETENESS.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|
    --|  NOTES:
    --|    The number of activities is decremented if the delete is successful.
    --|
    --|    A check is made to insure the last activity is not deleted.  There
    --|    must be at least one activity at all times.
    ------------------------------------------------------------------------------
    Abort_Proc : Boolean;           -- abort getting an existing AC
    Ac_Number : Integer := 0;      -- number of the activity we are deleting
    Ac_Record : Activity_Pointer;  -- activity record
    End_List : Boolean;           -- parameter to walk
    Found : Boolean;           -- parameter to find
    Key : Ac_Name_Type;      -- name of activity looking for
    New_Number : Ac_Name_Type;      -- replacement ac
    Successful : Boolean := False;  -- if key found in list

    procedure Delete_Ac_Completeness is separate;
    procedure Delete_Ss_Task_Num is separate;
    procedure Delete_Multiple_People is separate;

begin
    if Num_Of_Activities > 1 then
        -- have to have at least one activity
        Put_Line ("Which activity would you like to delete? ");
        -- get the name
        Prompt_Pkg.Existing_Activ_Name (Abort_Proc, Key);

        if not Abort_Proc then
            -- get the number of the activity so we can delete it from the
            -- activity completeness array and subsystem task number array
            Start_Walk (Ac_List);

            loop
                Walk (Ac_List, Ac_Record, End_List);
                Ac_Number := Ac_Number + 1;

                if Ac_Record.Name = Key then
                    exit;
                end if;
            end loop;

            --  delete the activity from the list
            Delete (Ac_List, Key, Successful);

            if Successful then
                -- activity was found and deleted from the list
                --  delete activity completeness information from element data
                Delete_Ac_Completeness;
                Delete_Ss_Task_Num;
                -- if multiple people on an element, delete person's initials from ac
                Delete_Multiple_People;
                --  decrement num of activities counter
                Num_Of_Activities := Num_Of_Activities - 1;

                New_Line;
                Put (" The number of activities = ");
                Put (Num_Of_Activities, 1);
                New_Line (2);
                delay 1.0;

            end if;

        end if; -- not abort
    else
        Put_Line (" You must have at least one activity at all times. ");
        Put_Line (" Since you only have one activity at this time, you ");
        Put_Line (" cannot delete it. ");
    end if;
end Ac_Delete;