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: ┃ T V

⟦933bc7e65⟧ TextFile

    Length: 2632 (0xa48)
    Types: TextFile
    Names: »V«

Derivation

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

TextFile

package Calendar is

    type Time is private;

    subtype Year_Number  is Integer range 1901 .. 2099;  
    subtype Month_Number is Integer range 1 .. 12;  
    subtype Day_Number   is Integer range 1 .. 31;  
    subtype Day_Duration is Duration range 0.0 .. 86_400.0;

    function Clock return Time;

    function Year    (Date : Time) return Year_Number;  
    function Month   (Date : Time) return Month_Number;  
    function Day     (Date : Time) return Day_Number;  
    function Seconds (Date : Time) return Day_Duration;

    procedure Split (Date    : in  Time;  
                     Year    : out Year_Number;  
                     Month   : out Month_Number;  
                     Day     : out Day_Number;  
                     Seconds : out Day_Duration);

    function Time_Of (Year    : Year_Number;  
                      Month   : Month_Number;  
                      Day     : Day_Number;  
                      Seconds : Day_Duration := 0.0) return Time;


    function "+" (Left : Time; Right : Duration) return Time;  
    function "+" (Left : Duration; Right : Time) return Time;  
    function "-" (Left : Time; Right : Duration) return Time;  
    function "-" (Left : Time; Right : Time)     return Duration;

    function "<"  (Left, Right : Time) return Boolean;  
    function "<=" (Left, Right : Time) return Boolean;  
    function ">"  (Left, Right : Time) return Boolean;  
    function ">=" (Left, Right : Time) return Boolean;

    Time_Error : exception;  -- can be raised by TIME_OF, "+", and "-"

private

    subtype Day_Id is Integer range 0 .. 72683;

    subtype Tick_Id is Day_Duration
                          range 0.0 .. Day_Duration'Last - Day_Duration'Delta;
    -- exclude the value 86_400.0

    type Time is
        record
            Days    : Day_Id;
            Seconds : Tick_Id;
        end record;

    pragma Suppress (Elaboration_Check, On => Clock);

    pragma Suppress (Elaboration_Check, On => Year);
    pragma Suppress (Elaboration_Check, On => Month);
    pragma Suppress (Elaboration_Check, On => Day);
    pragma Suppress (Elaboration_Check, On => Seconds);

    pragma Suppress (Elaboration_Check, On => Split);
    pragma Suppress (Elaboration_Check, On => Time_Of);

    pragma Suppress (Elaboration_Check, On => Calendar."+");
    pragma Suppress (Elaboration_Check, On => Calendar."-");

    pragma Suppress (Elaboration_Check, On => Calendar."<");
    pragma Suppress (Elaboration_Check, On => Calendar."<=");
    pragma Suppress (Elaboration_Check, On => Calendar.">");
    pragma Suppress (Elaboration_Check, On => Calendar.">=");

end Calendar;