|
|
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: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Package_Umps_Defs, seg_026d03
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
with Umps_Defs;
package body Package_Umps_Defs is
function Bornes (Str : String) return String is
begin
return "(" & Natural'Image (Str'First) & "," &
Natural'Image (Str'Last) & ")";
end Bornes;
procedure Test_Norme1 (Str1 : String; Str2 : in out String) is
use Text_Io;
begin
Put (">" & Str1 & Bornes (Str1) & "< :=");
Umps_Defs.Normalize (Str1, Str2);
Put_Line (">" & Str2 & Bornes (Str2) & "<");
end Test_Norme1;
procedure Test_Normalisations is
use Text_Io;
The_String : Umps_Defs.String;
The_Name : Umps_Defs.Name;
Chaine1_10 : String (1 .. 10);
Chaine2_10 : String (2 .. 10);
Chaine5_8 : String (5 .. 8);
Chaine6_7 : String (6 .. 7);
begin
Test_Norme1 ("1234567890", Chaine1_10);
Test_Norme1 ("123456789012345", Chaine1_10);
Test_Norme1 ("123456", Chaine1_10);
Test_Norme1 ("", Chaine1_10);
New_Line;
Test_Norme1 ("123456789", Chaine2_10);
Test_Norme1 ("123456789012345", Chaine2_10);
Test_Norme1 ("123456", Chaine2_10);
Test_Norme1 ("", Chaine2_10);
New_Line;
Test_Norme1 ("1234", Chaine5_8);
Test_Norme1 ("1234567890", Chaine5_8);
Test_Norme1 ("12", Chaine5_8);
Test_Norme1 ("", Chaine5_8);
Test_Norme1 ("34567890", Chaine5_8);
New_Line;
Test_Norme1 (Chaine5_8, Chaine1_10);
Test_Norme1 (Chaine5_8, Chaine2_10);
Test_Norme1 (Chaine5_8, Chaine5_8);
Test_Norme1 (Chaine5_8, Chaine6_7);
New_Line;
end Test_Normalisations;
procedure Test_String (Str : String) is
use Text_Io;
The_String : Umps_Defs.String := Umps_Defs.Normalize (Str);
begin
Put_Line (Str & Bornes (Str) & " := " & String (The_String));
end Test_String;
procedure Test_Name (Str : String) is
use Text_Io;
The_Name : Umps_Defs.Name := Umps_Defs.Normalize (Str);
begin
Put_Line (Str & Bornes (Str) & " := " & String (The_Name));
end Test_Name;
procedure Test_Normes is
use Text_Io;
Chaine2_10 : String (2 .. 10) := "234567890";
begin
Test_String ("123456789");
Test_String ("");
Test_String ("123456789012345678901234567890");
Test_String ("1234567890123456789012345");
Test_String (Chaine2_10);
New_Line;
Test_Name ("1234567890");
Test_Name ("12345678901234567890");
Test_Name ("123456789012345");
Test_Name ("");
Test_Name (Chaine2_10);
New_Line;
end Test_Normes;
procedure Denor_Norm_String (Str : String) is
use Text_Io;
use Umps_Defs;
The_String : Umps_Defs.String := Normalize (Str);
begin
Put_Line (Str & Bornes (Str) & " := " & Denormalize (The_String) &
Bornes (Denormalize (The_String)));
end Denor_Norm_String;
procedure Denor_Norm_Name (Str : String) is
use Text_Io;
use Umps_Defs;
The_Name : Umps_Defs.Name := Normalize (Str);
begin
Put_Line (Str & Bornes (Str) & " := " & Denormalize (The_Name) &
Bornes (Denormalize (The_Name)));
end Denor_Norm_Name;
procedure Test_Denor_Norm is
use Text_Io;
begin
Denor_Norm_String ("");
Denor_Norm_String ("Hello");
Denor_Norm_String ("123456789012345678901234567890");
Denor_Norm_String ("1234567890123456789012345");
New_Line;
Denor_Norm_Name ("");
Denor_Norm_Name ("Hello");
Denor_Norm_Name ("12345678901234567890");
Denor_Norm_Name ("123456789012345");
New_Line;
end Test_Denor_Norm;
procedure Test is
use Text_Io;
begin
New_Line;
Put_Line ("---> Test Package Umps_defs");
Put_Line ("-- Test Nomalisations");
Test_Normalisations;
Put_Line ("-- Test fonctions normes");
Test_Normes;
Put_Line ("-- Test denor( norm)");
Test_Denor_Norm;
end Test;
end Package_Umps_Defs;
nblk1=6
nid=2
hdr6=a
[0x00] rec0=21 rec1=00 rec2=01 rec3=040
[0x01] rec0=1e rec1=00 rec2=05 rec3=022
[0x02] rec0=22 rec1=00 rec2=03 rec3=012
[0x03] rec0=20 rec1=00 rec2=06 rec3=014
[0x04] rec0=11 rec1=00 rec2=04 rec3=000
[0x05] rec0=41 rec1=d5 rec2=23 rec3=79c
tail 0x21520472e83aa796e9870 0x42a00088462063c03
Free Block Chain:
0x2: 0000 00 00 01 45 80 30 20 20 20 20 20 20 20 50 75 74 ┆ E 0 Put┆