Important: The information in this document is obsolete and should not be used for new development.
Converting Between Strings and Floating-Point Numbers
Once you have created aNumFormatStringRec
record that specifies how numbers are represented, as described in "Using Number Format Specification Strings for International Number Formatting," which begins on page 5-94, you can use two other Text Utilities routines to convert between string and floating-point representations of numbers. Floating-point numbers are stored in standard Apple (SANE) format.
- The
StringToExtended
function converts the string representation of a number into a floating-point number, using aNumFormatStringRec
record to specify how the input number string is formatted.- The
ExtendedToString
function converts a floating-point number into a string that can be presented to the user, using aNumFormatStringRec
record to specify how the output number string is formatted.
Subtopics
- StringToExtended
- ExtendedToString