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_UNSQZN

FT_UNSQZN()
 Uncompress a numeric compressed by FT_SQZN()
------------------------------------------------------------------------------

 Syntax

      FT_UNSQZN( <cCompressed>, <nSize> [, <nDecimals> ] ) -> nValue

 Arguments

     <cCompressed>  - Compressed string, obtained from FT_SQZN()

     <nSize>        - Size of numeric field

     <nDecimals>    - Optional number of decimal places

 Returns

     nValue       - Uncompressed numeric value

 Description

    The FT_UNSQZN function returns the numeric value from the compressed
    string.  The compression is 50% the storage space of the original
    number.  The original number must have been compressed using the
    FT_SQZN() function.

    This function, along with FT_SQZN() can be used to reduce disk storage
    requirements for numeric fields in a database file.

 Examples

    mcust_id := FT_UNSQZN(TRANS->cust_id,8),;
    mamount  := FT_UNSQZN(TRANS->amount,12,2)

 Source: SQZN.PRG

 Author: Joseph D. Booth, Sr.

See Also: FT_SQZN()

FT_SQZN

FT_SQZN()
 Compress a numeric value into a character string

 Syntax

      FT_SQZN( <nValue> [, <nSize> [, <nDecimals> ] ] ) -> cCompressed

 Arguments

     nValue       - The numeric value to be compressed
     nSize        - Optional size of numeric field, defaults to 10
     nDecimals    - Optional number of decimal places, defaults to 0

 Returns

     cCompressed  - Compressed string, 50% the size of nSize

 Description

    The FT_SQZN function allows a numeric value to be compressed when
    stored in the database.  The compression is 50% the storage space
    of the original number.  The companion function, FT_UNSQZN returns
    the original number from the compressed string.

 Examples

  replace TRANS->cust_id with FT_SQZN(mcust_id,8),;
          TRANS->amount  with FT_SQZN(mamount,12,2)

 Source: SQZN.PRG

 Author: Joseph D. Booth, Sr.

See Also: FT_UNSQZN