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

⟦e8237fee1⟧ TextFile

    Length: 750 (0x2ee)
    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

-- DETERMINES VALUE! USING A RECURSIVE FUNCTION


with Instrument;
use Instrument;

procedure Facta2 is
    V : Integer;
    Fact : constant Integer := 12;
    Cycle : constant Integer := 1000;
    function Factorial (Value : in Integer) return Integer is

    begin

        if

           Value = 1

            then

            return 1;

        else

            return (Value * Factorial (Value - 1));

        end if;

    end Factorial;


begin

    Start ("FACTA2", " RECURSIVE FUNCTION FOR VALUE! CALLED 1000 TIMES");
    for I in 1 .. Cycle loop
        V := Factorial (Fact);
        V := Ident_Int (V);
    end loop;
    Comment ("FACTORIAL OF " & Integer'Image (Fact) &
             " IS " & Integer'Image (V));
    Stop;
end Facta2;