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 - download
Index: ┃ B T

⟦33c23fd40⟧ TextFile

    Length: 2626 (0xa42)
    Types: TextFile
    Names: »B«

Derivation

└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─ ⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦24d1ddd49⟧ 
                └─⟦this⟧ 

TextFile

--    The use of this system is subject to the software license terms and
--    conditions agreed upon between Rational and the Customer.
--
--                Copyright 1988 by Rational.
--
--                          RESTRICTED RIGHTS LEGEND
--
--    Use, duplication, or disclosure by the Government is subject to
--    restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
--    Technical Data and Computer Software clause at 52.227-7013.
--
--
--                Rational
--                3320 Scott Boulevard
--                Santa Clara, California 95054-3197
--
--   PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL;
--   USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION
--   IS STRICTLY PROHIBITED.  THIS MATERIAL IS PROTECTED AS
--   AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF
--   1976.  CREATED 1988.  ALL RIGHTS RESERVED.
--
--

with Attribute_Definitions;
with Runtime_Ids;

function Integer_Width (Low_Value  : Integer;  
                        High_Value : Integer) return Natural is
    pragma Routine_Number (Runtime_Ids.Int_Width);

    -- Returns the 'Width of a dynamic subtype of an integer type.

    pragma Suppress (Index_Check);
    pragma Suppress (Range_Check);
    pragma Suppress (Access_Check);
    pragma Suppress (Storage_Check);

    function Integer_Image_Width (Vv : Integer) return Natural is
        pragma Routine_Number (Runtime_Ids.Internal);
        V : Natural := abs (Vv / 10);
        N : Natural := 2;
    begin
        loop
            if V = 0 then
                return N;
            elsif V < 10 then
                return N + 1;
            elsif V < 100 then
                return N + 2;
            elsif V < 1000 then
                return N + 3;
            elsif V < 10000 then
                return N + 4;
            else
                V := V / 10000;
                N := N + 4;
            end if;
        end loop;
    end Integer_Image_Width;

    function Max (I, J : Natural) return Natural is
        pragma Routine_Number (Runtime_Ids.Internal);
    begin
        if I > J then
            return I;
        else
            return J;
        end if;
    end Max;
    -- pragma Inline (Max);

begin
    if Low_Value > High_Value then
        return 0;
    else
        return Max (Integer_Image_Width (Low_Value),
                    Integer_Image_Width (High_Value));
    end if;
end Integer_Width;
pragma Export_Function (Internal => Integer_Width, External => "__INT_WIDTH");
pragma Runtime_Unit (Unit_Number         => Runtime_Ids.Runtime_Compunit,
                     Elab_Routine_Number => Runtime_Ids.Internal);