|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 1230 (0x4ce)
Types: TextFile
Names: »V«
└─⟦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⟧
-- This package simulates single dimensioned arrays. The
-- type declaration for the array would look like (using the formals below)
-- type XXX is array (index) of element_ptr;
-- This generic is intended to replace the array as cleanly as possible.
-- An example of how this can be done is:
-- Without the generic, one would typically declare the array as
-- foo:XXX
-- This construct can be simulated by
-- function foo(x:index) return element_ptr renames generic.fetch
-- The values returned always point at a valid element, either initialized
-- as per the element type declaration, or one existing from some other access.
-- The storage is allocated as needed on the 'heap' provided.
-- 'Heap' must be initialized when the generic is instantiated. In many
-- cases, job_segment.get can be used as the initializer for 'heap'
with System;
generic
type Element is private;
type Element_Ptr is access Element;
pragma Segmented_Heap (Element_Ptr);
pragma Short_Pointer (Element_Ptr);
type Index is range <>;
Heap : System.Segment;
package Ersatz_Array_Generic is
function Fetch (N : Index) return Element_Ptr;
procedure Exchange (A, B : Index);
end Ersatz_Array_Generic;