|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Carre, seg_04d171
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Io; package body Carre is procedure Initialiser is begin for Abscisse in Tableau'Range (1) loop for Ordonnee in Tableau'Range (2) loop Tableau (Abscisse, Ordonnee).Etat := Libre; Tableau (Abscisse, Ordonnee).Valeur := 0; end loop; end loop; end Initialiser; procedure Afficher is begin for Ordonnee in Tableau'Range (2) loop for Abscisse in Tableau'Range (1) loop Io.Put (Tableau (Abscisse, Ordonnee).Valeur); Io.Put (" "); end loop; Io.New_Line; end loop; end Afficher; function Deplacer (Pos : Position) return Position is Posi : Position; begin Posi := Pos; -- --Essai de deplacement en Nord-Est -- if Posi.Abscisse = Dim_Carre'Last then Posi.Abscisse := Dim_Carre'First; else Posi.Abscisse := Dim_Carre'Succ (Posi.Abscisse); end if; if Posi.Ordonnee = 1 then Posi.Ordonnee := Dim_Carre'Last; else Posi.Ordonnee := Dim_Carre'Pred (Posi.Ordonnee); end if; if Carre.Tableau (Posi.Abscisse, Posi.Ordonnee).Etat = Carre.Etat_Champ'Last then -- Move Nord Ouest ; if Posi.Abscisse = Dim_Carre'First then Posi.Abscisse := Dim_Carre'Last; else Posi.Abscisse := Dim_Carre'Pred (Posi.Abscisse); end if; if Posi.Ordonnee = 1 then Posi.Ordonnee := Dim_Carre'Last; else Posi.Ordonnee := Dim_Carre'Pred (Posi.Ordonnee); end if; end if; return Posi; end Deplacer; function Aller_Au_Centre return Position is X, Y : Dim_Carre; Posi : Position; begin X := (Dim_Carre'Last / 2) + 1; Y := X; Posi.Abscisse := X; Posi.Ordonnee := Y; return Posi; end Aller_Au_Centre; end Carre;
nblk1=4 nid=4 hdr6=6 [0x00] rec0=24 rec1=00 rec2=01 rec3=016 [0x01] rec0=22 rec1=00 rec2=02 rec3=01a [0x02] rec0=11 rec1=00 rec2=03 rec3=000 [0x03] rec0=11 rec1=00 rec2=03 rec3=000 tail 0x217548d1287564d95ada5 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 00 00 a2 80 09 73 69 74 69 6f 6e 20 69 73 09 ┆ sition is ┆