zfp_genesis 1
zfp_genesis 2
zfp_genesis 3
zfp_genesis 4
zfp_genesis 5
zfp_genesis 6
zfp_genesis 7
zfp_genesis 8
zfp_genesis 9
zfp_genesis 10
zfp_genesis 11
zfp_genesis 12
zfp_genesis 13
zfp_genesis 14
zfp_genesis 15
zfp_genesis 16 with Ada.Text_IO; use Ada.Text_IO;
zfp_genesis 17
zfp_genesis 18 package body Ada.Integer_Text_IO is
zfp_genesis 19
zfp_genesis 20
zfp_genesis 21
zfp_genesis 22
zfp_genesis 23
zfp_genesis 24 procedure Put (X : Integer) is
zfp_genesis 25 Neg_X : Integer;
zfp_genesis 26 S : String (1 .. Integer'Width);
zfp_genesis 27 First : Natural := S'Last + 1;
zfp_genesis 28 Val : Integer;
zfp_genesis 29
zfp_genesis 30 begin
zfp_genesis 31
zfp_genesis 32
zfp_genesis 33 Neg_X := (if X < 0 then X else -X);
zfp_genesis 34
zfp_genesis 35 loop
zfp_genesis 36
zfp_genesis 37
zfp_genesis 38
zfp_genesis 39 Val := Neg_X rem 10;
zfp_genesis 40 Neg_X := (Neg_X - Val) / 10;
zfp_genesis 41 First := First - 1;
zfp_genesis 42 S (First) := Character'Val (Character'Pos ('0') - Val);
zfp_genesis 43 exit when Neg_X = 0;
zfp_genesis 44 end loop;
zfp_genesis 45
zfp_genesis 46 if X < 0 then
zfp_genesis 47 First := First - 1;
zfp_genesis 48 S (First) := '-';
zfp_genesis 49 end if;
zfp_genesis 50
zfp_genesis 51 Put (S (First .. S'Last));
zfp_genesis 52 end Put;
zfp_genesis 53
zfp_genesis 54 end Ada.Integer_Text_IO;