1987-05-13 14:36:45 +00:00
|
|
|
DEFINITION MODULE Conversions;
|
1988-02-19 15:54:01 +00:00
|
|
|
(*
|
|
|
|
Module: Numeric-to-string conversions
|
|
|
|
Author: Ceriel J.H. Jacobs
|
|
|
|
Version: $Header$
|
|
|
|
*)
|
1987-05-13 14:36:45 +00:00
|
|
|
|
|
|
|
PROCEDURE ConvertOctal(num, len: CARDINAL; VAR str: ARRAY OF CHAR);
|
|
|
|
(* Convert number "num" to right-justified octal representation of
|
|
|
|
"len" positions, and put the result in "str".
|
|
|
|
If the result does not fit in "str", it is truncated on the right.
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE ConvertHex(num, len: CARDINAL; VAR str: ARRAY OF CHAR);
|
|
|
|
(* Convert a hexadecimal number to a string *)
|
|
|
|
|
|
|
|
PROCEDURE ConvertCardinal(num, len: CARDINAL; VAR str: ARRAY OF CHAR);
|
|
|
|
(* Convert a cardinal number to a string *)
|
|
|
|
|
|
|
|
PROCEDURE ConvertInteger(num: INTEGER;
|
|
|
|
len: CARDINAL;
|
|
|
|
VAR str: ARRAY OF CHAR);
|
|
|
|
(* Convert an integer number to a string *)
|
|
|
|
|
|
|
|
END Conversions.
|