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

⟦efd4e8f69⟧ TextFile

    Length: 2705 (0xa91)
    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

with Get_The_Answer;
with Text_Io;
separate (Determine_Metrics)
procedure Prompt_For_Which_Metrics is
    --==============================================================
    -- This procedure prompts the user for the type of metric to   =
    -- produce. Prompts will be made for Halstead's metric,        =
    -- McCabe's metric, and lines of code. If the user's answer is =
    -- yes, then the appropriate object declared in the body of    =
    -- Determine_Metrics will be set (Finite State Machine         =
    -- Approach). If the user's answer is no, then the object will =
    -- be cleared. A generic get package will be used to get the   =
    -- yes or no value from the user.                              =
    --                                                             =
    -- written by Gary Russell at EVB Software Engineering         =
    -- with help from Brad Balford and Johan Margono               =
    -- May 1985                                                    =
    --==============================================================

    type Answer is (Y, N);
    procedure Get_The_Metric_Answer is new Get_The_Answer (Item => Answer);
    Mccabe_Answer : Answer := Y;
    Lines_Of_Code_Answer : Answer := Y;
    Halstead_Answer : Answer := Y;

begin
    -- Prompt_For_Which_Metrics

    -- Put out the user prompt and get the answer

    Text_Io.Put_Line ("Would you like to produce McCabe's metric ?");
    Text_Io.Put ("Enter y (for yes) and n (for no) : ");
    Get_The_Metric_Answer (Mccabe_Answer);
    Text_Io.New_Line;

    -- Set or clear the finite state variable based on the user's
    -- answer

    if Mccabe_Answer = Y then
        Mccabe_Metric := True;
    else
        Mccabe_Metric := False;
    end if;

    -- Put out the user prompt and get the answer

    Text_Io.Put_Line ("Would you like to produce Halstead's metric ?");
    Text_Io.Put ("Enter y (for yes) and n (for no) : ");
    Get_The_Metric_Answer (Halstead_Answer);
    Text_Io.New_Line;

    -- Set or clear the finite state variable based on the user's
    -- answer

    if Halstead_Answer = Y then
        Halstead_Metric := True;
    else
        Halstead_Metric := False;
    end if;

    -- Put out the user prompt and get the answer

    Text_Io.Put_Line ("Would you like to produce Lines Of Code ?");
    Text_Io.Put ("Enter y (for yes) and n (for no) : ");
    Get_The_Metric_Answer (Lines_Of_Code_Answer);
    Text_Io.New_Line;

    -- Set or clear the finite state variable based on the user's
    -- answer

    if Lines_Of_Code_Answer = Y then
        Lines_Of_Code_Metric := True;
    else
        Lines_Of_Code_Metric := False;
    end if;

end Prompt_For_Which_Metrics;