|
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: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Vers_Caractere, seg_05a5ab
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Int_Io; with Text_Io; with Mc68k; package body Vers_Caractere is function Nb_Digit (I : in Integer) return Natural is Nb : Natural; begin if I > 1000 then Nb := 4; Text_Io.Put_Line ("conversion vers caractere: nombre superieur a 3 digits non attendu!"); elsif I >= 100 then Nb := 3; elsif I >= 10 then Nb := 2; elsif I >= 0 then Nb := 1; else Nb := 0; Text_Io.Put_Line ("conversion vers caractere: nombre negatif non attendu!"); end if; return Nb; end Nb_Digit; function Vers_String (I : in Integer) return String is S : constant String := Integer'Image (I); begin if I < 10 then return S (2 .. 2); elsif I < 100 then return S (2 .. 3); else return S (2 .. 4); end if; end Vers_String; procedure Mon_Ecrire (No_Port : in Integer; Donnee : in Integer) is Dim : Natural; begin Dim := Nb_Digit (Donnee); declare Str : String (1 .. Dim); begin Text_Io.Put_Line ("vers_caractere - la donnee en entree est : " & Integer'Image (Donnee)); Text_Io.Put_Line ("vers_caractere - longueur donnee en entree est : " & Integer'Image (Dim)); Text_Io.Put_Line ("vers_caractere - les donnees en sortie sont: "); Str := Vers_String (Donnee); for I in 1 .. Dim loop Text_Io.Put (Str (I)); Text_Io.Put_Line (""); Mc68k.Ecrire (No_Port, Str (I)); end loop; end; end Mon_Ecrire; end Vers_Caractere;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=26 rec1=00 rec2=01 rec3=00a [0x01] rec0=1b rec1=00 rec2=02 rec3=001 tail 0x21769d57e892977a6ea41 0x42a00088462060003