Compress a numeric value into a character string


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


     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


     cCompressed  - Compressed string, 50% the size of nSize


    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.


  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.


2 responses to “FT_SQZN

  1. Pingback: FT Functions | Viva Clipper !

  2. Pingback: FT Conversion | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.