|
|
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 - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Feu_Tricolor, seg_058c16
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
package body Feu_Tricolor is
subtype Nombre is Natural range 1 .. 10;
package Int_Io is new Text_Io.Integer_Io (Nombre);
procedure Envoie_Arreter (Objet_Feu : in Object) is
begin
Objet_Feu.Arreter_Feu;
end Envoie_Arreter;
procedure Envoie_Change_Couleur (Objet_Feu : in Object) is
begin
Objet_Feu.Changer_Couleur;
end Envoie_Change_Couleur;
procedure Affiche (Le_Feu : in Feu) is
begin
Text_Io.Put ("feu numero ");
Int_Io.Put (Le_Feu.Numero);
case Le_Feu.Couleur_Feu is
when Vert =>
Text_Io.Put_Line (" -> je suis vert...");
Text_Io.New_Line;
when Orange =>
Text_Io.Put_Line (" -> je suis orange..");
Text_Io.New_Line;
when Rouge =>
Text_Io.Put_Line (" -> je suis rouge...");
Text_Io.New_Line;
end case;
end Affiche;
procedure Change_La_Couleur (Le_Feu : in out Feu) is
begin
if Le_Feu.Couleur_Feu = Couleurs'Last then
Le_Feu.Couleur_Feu := Couleurs'First;
else
Le_Feu.Couleur_Feu := Couleurs'Succ (Le_Feu.Couleur_Feu);
end if;
end Change_La_Couleur;
task body Object is
Tourner : Boolean := True;
Un_Feu : Feu;
begin
Text_Io.New_Line;
Text_Io.Put_Line ("Test des Feux Tricolors...");
Text_Io.New_Line;
Affiche (Un_Feu);
while (Tourner) loop
select
accept Arreter_Feu;
Text_Io.Put ("J'arrete la tache feu numero");
Int_Io.Put (Un_Feu.Numero);
Text_Io.New_Line;
Tourner := False;
or
accept Changer_Couleur;
Change_La_Couleur (Un_Feu);
Affiche (Un_Feu);
end select;
end loop;
end Object;
end Feu_Tricolor;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=21 rec1=00 rec2=01 rec3=00a
[0x01] rec0=03 rec1=00 rec2=03 rec3=020
[0x02] rec0=1f rec1=00 rec2=02 rec3=018
[0x03] rec0=03 rec1=00 rec2=04 rec3=000
tail 0x2176699f088d47ccc5295 0x42a00088462060003