DEFINITION NumStr; (* SJ *)

(* conversion of numbers into strings and vice versa *)


VAR OK* : BOOLEAN; (* TRUE = no error *)
    ErrorPos* : INTEGER; (* index of error position in string *)


PROCEDURE IntTo* (Number,Base : INTEGER; VAR String : ARRAY OF CHAR);

(* convert an integer number to string *)


PROCEDURE LIntTo* (Number : LONGINT; Base : INTEGER;
                   VAR String : ARRAY OF CHAR);

(* convert a long integer number to string *)


PROCEDURE ToInt* (Base : INTEGER; VAR String : ARRAY OF CHAR) : INTEGER;

(* convert a string to an integer number *)


PROCEDURE ToLInt* (Base : INTEGER; VAR String : ARRAY OF CHAR) : LONGINT;

(* convert a string to a long integer number *)


PROCEDURE RealTo* (Number : REAL; n : INTEGER; VAR String : ARRAY OF CHAR);

(* convert real number to string with n digits *)


PROCEDURE LRealTo* (Number : LONGREAL; n : INTEGER; VAR String : ARRAY OF CHAR);

(* convert long real number to string with n digits *)


PROCEDURE ToReal* (VAR String : ARRAY OF CHAR) : REAL;

(* convert string to real number *)


PROCEDURE ToLReal* (VAR String : ARRAY OF CHAR) : LONGREAL;

(* convert string to long real number *)


PROCEDURE CardTo*(Number,Base : INTEGER; VAR String : ARRAY OF CHAR);

(* convert an integer number unsigned to string *)


PROCEDURE LCardTo*(Number : LONGINT; Base : INTEGER;
                   VAR String : ARRAY OF CHAR);

(* convert a long integer number unsigned to string *)


END NumStr.
