/*
 * $Id: ntow.txt 15102 2010-07-14 12:48:39Z vszakats $
 */

/*  $DOC$
 *  $FUNCNAME$
 *     FT_NTOW()
 *  $CATEGORY$
 *     Conversion
 *  $ONELINER$
 *     Translate numeric value to words
 *  $SYNTAX$
 *     FT_NTOW( <nNumber> ) -> cWords
 *  $ARGUMENTS$
 *     <nNumber>  An integer to translate
 *  $RETURNS$
 *     A text string representing <nNumber>
 *  $DESCRIPTION$
 *      Translates numeric input to a text string.
 * 
 *      FT_NTOW is intended to be used with integers only.  Since I don't
 *      know what your application will be, I can't assume the type of
 *      fraction you want returned (ninety nine cents, 99/100, .99, etc).
 *      If you want the fraction in words, just pass it as an integer.
 * 
 *      Do not pass a negative number!  Handle negative numbers any way
 *      you need to in your code.  (ie: CR, DB, Negative, Minus, etc.)
 * 
 *      Also, numeric 0 is returned as a null string.  You will need to
 *      make a decision how to output it (zero dollars, no dollars, etc).
 *  $EXAMPLES$
 *          ? FT_NTOW( 999 )        -> Nine Hundred Ninety Nine
 * 
 *          ? FT_NTOW( 1000 )       -> One Thousand
 * 
 *          ? FT_NTOW( 23 ) + " Dollars and " + FT_NTOW( 99 ) + " Cents"
 *                -> Twenty Three Dollars and Ninety Nine Cents
 * 
 *          ? FT_NTOW( 23 ) + " Dollars and " + "99/100"
 *                -> Twenty Three Dollars and 99/100
 * 
 *          x      := -23.99
 *          cents  := str( (x - int( x )) * 100, 2, 0 ) + "/100"
 *          x      := int( x )
 *          string := iif( x < 0, "Credit of ", "Debit of " )
 *          ? string + FT_NTOW( abs(x) ) + " Dollars and " + "99/100"
 *                -> Credit of Twenty Three Dollars and 99/100
 *  $END$
 */
