1 03/05/85  arithmetic_to_ascii_
 2 
 3 
 4 The arithmetic_to_ascii_ subroutine formats any arithmetic value into a
 5 compact ascii form.  An integer, fractional, or exponential format can
 6 be used, depending on the number to be converted.  Fixed-point numbers
 7 are truncated during the formatting process; floating-point numbers are
 8 rounded.
 9 
10 
11 Entry points in arithmetic_to_ascii_:
12    (List is generated by the help command)
13 
14 
15 :Entry: arithmetic_to_ascii_: 03/05/85  arithmetic_to_ascii_
16 
17 
18 Function:
19 This entry point formats any arithmetic value into a compact ascii
20 form.
21 
22 
23 Syntax:
24 declare arithmetic_to_ascii_ entry (ptr, fixed bin, bit(1) aligned,
25      fixed bin, fixed bin, char(132) varying);
26 call arithmetic_to_ascii_ (v_ptr, type, packed, precision, scale,
27      result);
28 
29 
30 Arguments:
31 v_ptr
32    is a pointer to the value to be converted.  (Input) It can be any
33    arithmetic data type (real or complex, fixed or float, binary or
34    decimal, single or double precision).
35 type
36    is a standard Multics descriptor type.  (Input) See the Programmer's
37    Reference Manual for a list of standard Multics data types.
38 packed
39    indicates whether the value is packed or unpacked.  (Input)
40    "0"b   value is unpacked.
41    "1"b   value is packed.
42 precision
43    is the precision of the value to be converted.  (Input)
44 scale
45    is the scale factor of the value to be converted.  (Input)
46 result
47    is the character-string representation of the value to be converted;
48    it contains no blanks.  (Output)
49 
50 
51 Notes:  If the value is complex, the real and imaginary parts are
52 formatted by correcting them to float decimal(59) and converting each
53 part separately.  The result returned by the arithmetic_to_ascii_
54 subroutine is the concatenation of the real and imaginary converted
55 parts, with a leading sign and trailing "i" supplied for the imaginary
56 part.