[BACK]Return to characters_and_numbers.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Numbers/characters_and_numbers.ads, Revision 1.1.1.1

1.1       maekawa     1: with text_io;                            use text_io;
                      2:
                      3: package Characters_and_Numbers is
                      4:
                      5: -- DESCRIPTION :
                      6: --   This package offers some utilities for the input/output routines
                      7: --   of arbitrary precision numbers.
                      8:
                      9:   function Convert ( c : character ) return natural;
                     10:
                     11:   -- DESCRIPTION :
                     12:   --   Returns 10 if the character does not represent a number
                     13:   --   between 0 and 9, otherwise returns the corresponding number.
                     14:
                     15:   function Convert ( s : String ) return natural;
                     16:
                     17:   -- DESCRIPTION :
                     18:   --   Converts the string into a number, the string is supposed to
                     19:   --   contain a number in decimal format.
                     20:
                     21:   function Convert_Decimal ( n : natural ) return character;
                     22:
                     23:   -- DESCRIPTION :
                     24:   --   Returns the character representation of the number n in [0,9].
                     25:
                     26:   function Convert_Hexadecimal ( c : character ) return natural;
                     27:
                     28:   -- DESCRIPTION :
                     29:   --   Returns the numerical representation of the character,
                     30:   --   if it is a hexadecimal symbol, otherwise 16 is returned.
                     31:
                     32:   function Convert_Hexadecimal ( n : natural ) return character;
                     33:
                     34:   -- DESCRIPTION :
                     35:   --   Returns the character representation of the number n in [0,15].
                     36:
                     37:   function Convert ( n : natural ) return String;
                     38:
                     39:   -- DESCRIPTION :
                     40:   --   Returns the representation of the natural number as a string
                     41:   --   of characters.
                     42:
                     43:   procedure Skip_Spaces ( file : in file_type; c : in out character );
                     44:
                     45:   -- DESCRIPTION :
                     46:   --   Scans the file for the first character that is not a space.
                     47:   --   That character is returned as the parameter c on return.
                     48:
                     49:   procedure Skip_Underscores ( file : in file_type; c : in out character );
                     50:
                     51:   -- DESCRIPTION :
                     52:   --   Scans the file for the first character that is not an underscore.
                     53:   --   That character is returned as the parameter c on return.
                     54:
                     55: end Characters_and_Numbers;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>