Formatting for Output
Overview
The Currency Module provides a highly-flexible, yet easy-to-use system for formatting decimal numbers in virtually any format. In the Currency Module library, the core of this formatting ability is the RWDecimalFormat class. An instance of this class is a formatting object that encapsulates the parameters and algorithms used to format a number. The simplest way to create a formatting object is to supply a string, called a picture, that shows how the format looks. Once you have created an RWDecimalFormat object you can use it to format as many numbers as you like. You can even change its behavior on the fly.
In this chapter we show how to use formatting objects.