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;