home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gnat-2.06-src.tgz / tar.out / fsf / gnat / ada / a-tideio.ads < prev    next >
Text File  |  1996-09-28  |  3KB  |  71 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --               A D A . T E X T _ I O . D E C I M A L _ I O                --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.2 $                              --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. --  In Ada 95, the package Ada.Text_IO.Decimal_IO is a subpackage of Text_IO.
  19. --  This is for compatibility with Ada 83. In GNAT we make it a child package
  20. --  to avoid loading the necessary code if Decimal_IO is not instantiated. See
  21. --  routine Rtsfind.Text_IO_Kludge for a description of how we patch up the
  22. --  difference in semantics so that it is invisible to the Ada programmer.
  23.  
  24. private generic
  25.    type Num is delta <> digits <>;
  26.  
  27. package Ada.Text_IO.Decimal_IO is
  28.  
  29.    Default_Fore : Field := 2;
  30.    Default_Aft  : Field := Num'Digits - 1;
  31.    Default_Exp  : Field := 3;
  32.  
  33.    procedure Get
  34.      (File  : in File_Type;
  35.       Item  : out Num;
  36.       Width : in Field := 0);
  37.  
  38.    procedure Get
  39.      (Item  : out Num;
  40.       Width : in Field := 0);
  41.  
  42.    procedure Put
  43.      (File : in File_Type;
  44.       Item : in Num;
  45.       Fore : in Field := Default_Fore;
  46.       Aft  : in Field := Default_Aft;
  47.       Exp  : in Field := Default_Exp);
  48.  
  49.    procedure Put
  50.      (Item : in Num;
  51.       Fore : in Field := Default_Fore;
  52.       Aft  : in Field := Default_Aft;
  53.       Exp  : in Field := Default_Exp);
  54.  
  55.    procedure Get
  56.      (From : in String;
  57.       Item : out Num;
  58.       Last : out Positive);
  59.  
  60.    procedure Put
  61.      (To   : out String;
  62.       Item : in Num;
  63.       Aft  : in Field := Default_Aft;
  64.       Exp  : in Field := Default_Exp);
  65.  
  66. private
  67.    pragma Inline (Get);
  68.    pragma Inline (Put);
  69.  
  70. end Ada.Text_IO.Decimal_IO;
  71.