Text scanning and formatting

The Formatting framework provided by the native language support system lets you perform conversions between text and binary data. This mechanism allows data to be converted between language-dependent and language-independent forms, enabling you to create easily localizable interfaces.

This framework can be used to correctly scan and format the following types of data using the correct format for a particular locale:

The formatting classes scan data from or format data into a text instance, so that any scanned or formatted text can also have associated character styling information.

A special formatter, TParameterFormatter, allows you to specify a text string containing variable information that is formatted at run time, providing functionality similar to the C library function printf. See "Using TParameterFormatter" on page 219 for more information on this special formatter.

You can also use this class to implement conditional formats that are chosen by number. For example, you could specify the singular and plural forms of a text string to be used with a numeric variable so the output is grammatically correct. This process is described in "Specifying conditional formatters" on page 222.

How formatters operate
Using TParameterFormatter
Simple text formatting
Number formatting
Date and time formatting
Deriving TFormatter and TFormattable classes

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker