|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1026 (0x402)
Types: TextFile
Names: »B«
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
-- Fichier Formate
-- Specifications du package Formate
-- Methodes pour formater des chaines de caracteres
-- Auteur : Sebastien BROCHET
-- Date : 6 Decembre 1993
-- Etat : En cours
with Text_Io;
package body Formate is
function Entierverschaine
(Unnombre : Natural; Nbchiffres : Positive) return String is
Unechaine : String (1 .. Nbchiffres + 1);
Nbre : Natural := 0;
Nbaux : Natural := Unnombre;
begin
if Nbaux = 0 then
Nbre := 1;
else
while Nbaux /= 0 loop
Nbaux := Nbaux / 10;
Nbre := Nbre + 1;
end loop;
end if;
Unechaine (1 .. Nbre + 1) := Integer'Image (Integer (Unnombre));
Unechaine (1) := '0';
if Nbre = Nbchiffres then
return Unechaine (2 .. Nbre + 1);
else
return String'(1 .. Nbchiffres - Nbre - 1 => '0') &
Unechaine (1 .. Nbre + 1);
end if;
end Entierverschaine;
end Formate;