Numeric Formatting Routines - HP 9000 User Manual

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

Note
Although the form of the new language-sensitive character
identification routines does not differ from the "ASCII only"
routines, the type of argument passed has changed from char
to into When passing 8-bit bytes to these routines, the data
should be unsigned char, or cast to it, to ensure correct sign
extension.
Numeric Formatting
The numeric formatting routines (for example, ecvt, gcvt, atof, printf,
and fprintf) have been internationalized and give locale-sensitive results for
single-byte and multi-byte data. For information about restrictions on the use
of multi-byte data, see
ecvt(3C), strtod(3C),
and
printf(3C)
in Section 3 of the
HP-UX Reference.
Table 6-13. Numeric Formatting Routines
Routine
Description
atof
Converts a string to a float, correctly interpreting the radix
character according to the currently active value of the
LC_NUMERIC
category.
strtod
Converts a string to a double, correctly interpreting the radix
character according to the currently active value of the
LC_NUMERIC
category.
gcvt
Converts a double to a string and places the correct radix
character according to the currently active value of the
LC_NUMERIC
category.
Developing International Software
6-25
6

Advertisement

Table of Contents
loading

Table of Contents