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

File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / characters_and_numbers.ads (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:25 2000 UTC (23 years, 7 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with text_io;                            use text_io;

package Characters_and_Numbers is

-- DESCRIPTION :
--   This package offers some utilities for the input/output routines
--   of arbitrary precision numbers.

  function Convert ( c : character ) return natural;

  -- DESCRIPTION :
  --   Returns 10 if the character does not represent a number
  --   between 0 and 9, otherwise returns the corresponding number.

  function Convert ( s : String ) return natural;

  -- DESCRIPTION :
  --   Converts the string into a number, the string is supposed to
  --   contain a number in decimal format.

  function Convert_Decimal ( n : natural ) return character;

  -- DESCRIPTION :
  --   Returns the character representation of the number n in [0,9].

  function Convert_Hexadecimal ( c : character ) return natural;

  -- DESCRIPTION :
  --   Returns the numerical representation of the character,
  --   if it is a hexadecimal symbol, otherwise 16 is returned.

  function Convert_Hexadecimal ( n : natural ) return character;

  -- DESCRIPTION :
  --   Returns the character representation of the number n in [0,15].

  function Convert ( n : natural ) return String;

  -- DESCRIPTION :
  --   Returns the representation of the natural number as a string
  --   of characters.

  procedure Skip_Spaces ( file : in file_type; c : in out character );

  -- DESCRIPTION :
  --   Scans the file for the first character that is not a space.
  --   That character is returned as the parameter c on return.

  procedure Skip_Underscores ( file : in file_type; c : in out character );

  -- DESCRIPTION :
  --   Scans the file for the first character that is not an underscore.
  --   That character is returned as the parameter c on return.

end Characters_and_Numbers;