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

⟦4ba6c35b4⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Point, seg_059434

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 Coordonnees;
use Coordonnees;
with Cap;
use Cap;
with Action;
use Action;
package body Point is
    function Creer
                (Terminal : in Integer; X0, Y0 : in Tcoordonnees; C : Character)
                return Objet is
    begin
        return Objet'(Terminal => Terminal, X => X0, Y => Y0, R => C);
    end Creer;

    procedure Bouger_Nord (X, Y : in out Tcoordonnees) is
    begin
        if Y = 1 then
            Y := Max_Lin;
        else
            Y := Y - 1;
        end if;
    end Bouger_Nord;
    procedure Bouger_Sud (X, Y : in out Tcoordonnees) is
    begin
        if Y = Max_Lin then
            Y := 1;
        else
            Y := Y + 1;
        end if;
    end Bouger_Sud;
    procedure Bouger_Est (X, Y : in out Tcoordonnees) is
    begin
        if X = Max_Col then
            X := 1;
        else
            X := X + 1;
        end if;
    end Bouger_Est;

    procedure Bouger_Ouest (X, Y : in out Tcoordonnees) is
    begin
        if X = 1 then
            X := Max_Col;
        else
            X := X - 1;
        end if;
    end Bouger_Ouest;
    procedure Bouger (Point : in out Objet; Sens : Tdirection) is
    begin
        case Sens is
            when Sud =>
                Bouger_Sud (Point.X, Point.Y);
            when Nord =>
                Bouger_Nord (Point.X, Point.Y);
            when Est =>
                Bouger_Est (Point.X, Point.Y);
            when Ouest =>
                Bouger_Ouest (Point.X, Point.Y);
            when Sud_Est =>
                Bouger_Sud (Point.X, Point.Y);
                Bouger_Est (Point.X, Point.Y);
            when Sud_Ouest =>
                Bouger_Sud (Point.X, Point.Y);
                Bouger_Ouest (Point.X, Point.Y);
            when Nord_Est =>
                Bouger_Nord (Point.X, Point.Y);
                Bouger_Est (Point.X, Point.Y);
            when Nord_Ouest =>
                Bouger_Nord (Point.X, Point.Y);
                Bouger_Ouest (Point.X, Point.Y);
        end case;
    end Bouger;


    procedure Afficher (No_Terminal : in Integer; Point : in Objet) is
        Terminal : Mon_Terminal.Handle
            renames Mes_Terminaux (No_Terminal).Handle;
    begin
        Mon_Terminal.Ecrire
           (Terminal => Terminal, C => Point.R, X => Point.X, Y => Point.Y);
    end Afficher;

    procedure Effacer (No_Terminal : in Integer; Point : in Objet) is
        Terminal : Mon_Terminal.Handle
            renames Mes_Terminaux (No_Terminal).Handle;
    begin
        Mon_Terminal.Ecrire
           (Terminal => Terminal, C => ' ', X => Point.X, Y => Point.Y);
    end Effacer;


    function Pos_X (Point : in Objet) return Tcoordonnees is
    begin
        return Point.X;
    end Pos_X;


    function Pos_Y (Point : in Objet) return Tcoordonnees is
    begin
        return Point.Y;
    end Pos_Y;

    function Graphe (Point : in Objet) return Character is
    begin
        return Point.R;
    end Graphe;

    procedure Detruire (Point : in out Objet) is
    begin
        null;
    end Detruire;
end Point;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=29 rec1=00 rec2=01 rec3=04e
        [0x01] rec0=03 rec1=00 rec2=04 rec3=00a
        [0x02] rec0=1b rec1=00 rec2=05 rec3=03a
        [0x03] rec0=23 rec1=00 rec2=03 rec3=008
        [0x04] rec0=08 rec1=00 rec2=02 rec3=000
    tail 0x217678a5289028cabafb3 0x42a00088462060003