DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦1a284abda⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Arithmetic, seg_005828

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io;

package Arithmetic is
------------------------------------------------------------------------------
-- X Library Tool Types
--
-- Arithmetic - Machine/Compiler dependent numeric types.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
--                  All Rights Reserved.
------------------------------------------------------------------------------

--\x0c
    ------------------------------------------------------------------------------
-- 32-bit numeric types
------------------------------------------------------------------------------

    type S_Long is range -(2 ** 31) .. 2 ** 31 - 1;

    package S_Long_Io is new Text_Io.Integer_Io (S_Long);

    subtype S_Natural  is S_Long range 0 .. S_Long'Last;
    subtype S_Positive is S_Long range 1 .. S_Long'Last;

----Unfortunately, a 32-bit unsigned type is not portable to most present-day
-- Ada implementations.  The LRM would require them to implemented at least
--  33-bit signed arithmetic (or 64-bit arithmetic).
--
--    type U_Long is range 0 .. 2 ** 32 - 1;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------

    function Max (A : S_Long;  
                  B : S_Long) return S_Long;

    function Min (A : S_Long;  
                  B : S_Long) return S_Long;

--    function Max (A : U_Long;
--                  B : U_Long) return U_Long;
--
--    function Min (A : U_Long;
--                  B : U_Long) return U_Long;


------------------------------------------------------------------------------
-- 16-bit numeric types
------------------------------------------------------------------------------

    type S_Short is range -(2 ** 15) .. 2 ** 15 - 1;

    type U_Short is range 0 .. 2 ** 16 - 1;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------

    function Max (A : S_Short;  
                  B : S_Short) return S_Short;

    function Min (A : S_Short;  
                  B : S_Short) return S_Short;

    function Max (A : U_Short;  
                  B : U_Short) return U_Short;

    function Min (A : U_Short;  
                  B : U_Short) return U_Short;

------------------------------------------------------------------------------
-- 8-bit numeric types
------------------------------------------------------------------------------

    type S_Char is range -(2 ** 7) .. 2 ** 7 - 1;

    type U_Char is range 0 .. 2 ** 8 - 1;

------------------------------------------------------------------------------
-- Min/Max functions
------------------------------------------------------------------------------
   function Max (A : S_Char;  
                  B : S_Char) return S_Char;

    function Min (A : S_Char;  
                  B : S_Char) return S_Char;

    function Max (A : U_Char;  
                  B : U_Char) return U_Char;

    function Min (A : U_Char;  
                  B : U_Char) return U_Char;

------------------------------------------------------------------------------
-- General Directives
------------------------------------------------------------------------------

    pragma Inline (Max, Min);

end Arithmetic;

E3 Meta Data

    nblk1=6
    nid=0
    hdr6=c
        [0x00] rec0=17 rec1=00 rec2=01 rec3=02c
        [0x01] rec0=15 rec1=00 rec2=02 rec3=004
        [0x02] rec0=00 rec1=00 rec2=06 rec3=002
        [0x03] rec0=1d rec1=00 rec2=03 rec3=000
        [0x04] rec0=1d rec1=00 rec2=04 rec3=002
        [0x05] rec0=13 rec1=00 rec2=05 rec3=000
    tail 0x21700ab2481978ec309c0 0x42a00088462063203