FT Conversion

 FT_BYT2BIT()     Convert byte to string of 1's and 0's
 FT_BYT2HEX()     Convert byte to hexadecimal version of its binary value
 FT_D2E()         Convert decimal to scientific notation
 FT_DEC2BIN()     Convert decimal to binary
 FT_E2D()         Convert scientific notation string to a decimal
 FT_ESCCODE()     Convert Lotus style escape codes
 FT_HEX2DEC()     Convert a hex number to decimal
 FT_INVCLR()      Get the inverse of a color
 FT_NTOW()        Translate numeric value to words
 FT_SQZN()        Compress a numeric value into a character string
 FT_STOD()        Convert a date string to a Clipper date data type
 FT_UNSQZN()      Uncompress a numeric compressed by FT_SQZN()
 FT_XTOY()        Convert from any data type to any other data type

FT_NTOW

FT_NTOW()
 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

 Source: NTOW.PRG

 Author: Gary Baren