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

⟦6f0869814⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Bounded_String_Generic, seg_0522c9

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



generic
    Size : Natural := 20;
package Bounded_String_Generic is

    subtype String_Length is Natural range 0 .. Size;

    type Variable_String (Maximum_Length : String_Length := 0) is private;

    procedure Copy (Target : in out Variable_String; Source : Variable_String);
    procedure Copy (Target : in out Variable_String; Source : String);
    procedure Copy (Target : in out Variable_String; Source : Character);

    procedure Move (Target : in out Variable_String;
                    Source : in out Variable_String);

    function Image (V : Variable_String) return String;

    -- Value function with maximum length = current length
    function Value (S : String) return Variable_String;

    -- Value function with specified maximum length
    function Value (S : String; Max_Length : Natural) return Variable_String;
    pragma Inline (Image);

    procedure Free (V : in out Variable_String);

    procedure Append (Target : in out Variable_String;
                      Source :        Variable_String);

    procedure Append (Target : in out Variable_String; Source : String);

    procedure Append (Target : in out Variable_String; Source : Character);

    procedure Append (Target : in out Variable_String;
                      Source :        Character;
                      Count  :        Natural);

    procedure Insert (Target : in out Variable_String;
                      At_Pos :        Positive;
                      Source :        Variable_String);

    procedure Insert (Target : in out Variable_String;
                      At_Pos :        Positive;
                      Source :        String);

    procedure Insert (Target : in out Variable_String;
                      At_Pos :        Positive;
                      Source :        Character);

    procedure Insert (Target : in out Variable_String;
                      At_Pos :        Positive;
                      Source :        Character;
                      Count  :        Natural);

    procedure Delete (Target : in out Variable_String;
                      At_Pos :        Positive;
                      Count  :        Natural := 1);

    procedure Replace (Target : in out Variable_String;
                       At_Pos :        Positive;
                       Source :        Character);

    procedure Replace (Target : in out Variable_String;
                       At_Pos :        Positive;
                       Source :        Character;
                       Count  :        Natural);

    procedure Replace (Target : in out Variable_String;
                       At_Pos :        Positive;
                       Source :        String);

    procedure Replace (Target : in out Variable_String;
                       At_Pos :        Positive;
                       Source :        Variable_String);

    -- Truncate or extend with fill
    procedure Set_Length (Target     : in out Variable_String;
                          New_Length :        Natural;
                          Fill_With  :        Character := ' ');

    -- Get information about or contents of a string
    function Length  (Source : Variable_String) return Natural;
    function Char_At (Source : Variable_String; At_Pos : Positive)
                     return Character;

    function Extract (Source    : Variable_String;
                      Start_Pos : Positive;
                      End_Pos   : Natural) return String;

    -- get the allocated length of the string
    function Max_Length (Source : Variable_String) return Natural;
    pragma Inline (Length);
    pragma Inline (Char_At);
    pragma Inline (Max_Length);
private
    type Variable_String (Maximum_Length : String_Length := 0) is
        record
            Length   : String_Length := 0;
            Contents : String (1 .. Maximum_Length);
        end record;

end Bounded_String_Generic;

E3 Meta Data

    nblk1=6
    nid=6
    hdr6=a
        [0x00] rec0=1c rec1=00 rec2=01 rec3=05a
        [0x01] rec0=19 rec1=00 rec2=02 rec3=038
        [0x02] rec0=19 rec1=00 rec2=03 rec3=032
        [0x03] rec0=19 rec1=00 rec2=04 rec3=02c
        [0x04] rec0=01 rec1=00 rec2=05 rec3=000
        [0x05] rec0=00 rec1=00 rec2=00 rec3=080
    tail 0x21759a83087a06789f395 0x42a00088462063203
Free Block Chain:
  0x6: 0000  00 00 00 25 80 08 53 74 72 69 6e 67 29 3b 08 00  ┆   %  String);  ┆