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

⟦395401022⟧ TextFile

    Length: 1525 (0x5f5)
    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

package body Halstead_Operator is

    function Is_Equal
                (Left : in Definition; Right : in Definition) return Boolean is
    begin
        -- Is_Equal

        if Left.Kind = Literal and Right.Kind = Literal then

            return Dyn.Str (Left.Value) = Dyn.Str (Right.Value);

        else

            return Operator_Kind'Image (Left.Kind) =
                      Operator_Kind'Image (Right.Kind);

        end if;

    end Is_Equal;

    --** changed 11/18/85 by J. Margono
    --** reason: logic error
    function "<" (Left : in Definition; Right : in Definition) return Boolean is
    begin
        -- "<"

        if Left.Kind = Literal and Right.Kind = Literal then

            return Dyn.Str (Left.Value) < Dyn.Str (Right.Value);

        elsif Left.Kind /= Literal and Right.Kind = Literal then

            return Operator_Kind'Image (Left.Kind) < Dyn.Str (Right.Value);

        elsif Left.Kind = Literal and Right.Kind /= Literal then

            return Dyn.Str (Left.Value) < Operator_Kind'Image (Right.Kind);

        else
            -- Left.Kind /= Literal and Right.Kind /= Literal then

            return Operator_Kind'Image (Left.Kind) <
                      Operator_Kind'Image (Right.Kind);

        end if;

    end "<";


    function Convert (This_String : in String) return Definition is
        -- converts string to operator
    begin
        -- Convert

        return (Kind => Literal, Value => Dyn.D_String (Str => This_String));

    end Convert;

end Halstead_Operator;