Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_sqzn()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson