Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Currency Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.5 Special Values

In addition to regular numeric values, RWDecimal and RWFixedDecimal classes can also take on one of three special non-numeric values: null, missing, or NaN. The null and missing values are useful because of their properties when used in calculations. In most cases, an arithmetic operation involving a number and null will result in the numeric operand. Using null allows the representation of a non-numeric value without propagating that value throughout the calculations. A missing value is different in that it will propagate through calculations; an arithmetic operation involving a missing value will have a missing value as a result. The NaN value is primarily an error value, for example, an NaN value will result from division by zero. The following list describes how these values operate when used in calculations. (The value 2 could be any numeric value.)

Each RWDecimal<T> class has static members null, missing, and NaN that can be used to assign or test for these values. For example



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.