03/31/83 numeric_to_ascii_ Entry points in numeric_to_ascii_: (List is generated by the help command) :Entry: numeric_to_ascii_: 02/08/83 numeric_to_ascii_ Function: formats a real decimal floating-point number. Integer, fractional, or exponential format is used depending on the number being formatted. The value returned by this function is a varying character string that can contain an optional minus sign, from 1 to 59 decimal digits, and, in some cases, an exponent field. The caller can control the number of digits placed in the string. For numbers based in a number system other than base 10, use the numeric_to_ascii_base_ subroutine. Syntax: declare numeric_to_ascii_ entry (float dec(59), fixed bin) returns (char(72) varying); result = numeric_to_ascii_ ((value), precision); Arguments: value is the value to be formatted. (Input) The PL/I compiler converts to float dec(59) if the attributes of value are different. The extra pair of parentheses around value suppresses the warning message about the conversion that would normally be generated. precision controls the number of digits placed in the output string. (Input) If precision is equal to 0, from 1 to 59 digits are placed in the result string depending on the value being formatted. If precision is less than 0, the decimal value is truncated to the specified number of digits. If precision is greater than 0, the decimal value is rounded to the specified number of digits. In the cases where precision is not 0, no more than the specified number of digits are placed in the output string. result is the character-string representation of value; it contains no blanks. (Output) Notes: To convert integers, use the PL/I sequence: result = ltrim (char (value)); If precision equals 0, 59 is used for the precision. In the following discussion, P is equal to min (59, precision). A number in integer format consists of a string of from 1 to P decimal digits without a decimal point. Integer format is used for integers whose absolute value is less than 10**P. A number in fractional format consists of from 1 to P decimal digits with a decimal point. Trailing zeros in the fractional part are omitted; a number less than 1 has a 0 to the left of the decimal point. Fractional format is used for nonintegers that can be exactly represented in this format. A number in exponential format appears as: xey or xe-y where x is a number greater than 1 and less than 10 in fractional format and y is a power of 10 such that the numeric value being formatted is x*10**y. Exponential format is used whenever integer or fractional format cannot be used. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved