Results 1 to 4 of 4

Thread: Export float rounded

  1. #1
    Join Date
    Feb 2007
    Posts
    72

    Default Export float rounded

    Hi Russell

    Export float works fine with one except for the trailing zeros. I set myself a limit of 2 hours to try and find answers or figure things out before I ask and I am now just trying random trial and error to round this down to only 2 decimal points (or /100) I may be close, but I havenít yet hit the right combination to make this happen. How can trim this down to show only 2 points (x.xx)?

    Thanks
    Nelson

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Export float rounded

    Hi,

    Declare your float like this:

    Code:
    export float   fVal(2);
    The full syntax available is:
    Code:
         float  name([dec-places[,point-char[,thousands-sep]])
    So, the first option is a number for decimal places, the second is the character to use for the decimal point (important for Europeans), and the third is the character to use for thousands separators.

    Full example:
    Code:
    export float  fVal(3,'.',',');
    would provide exported values like:
    Code:
    13,456.780
    0.123
    12.020
    1.000
    Don't spend very long trying to get this obscure stuff working.....since there isn't yet a manual for the Computation Module, please feel free to just post questions.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Feb 2007
    Posts
    72

    Default Re: Export float rounded

    Perfect!
    Thank you

  4. #4
    Join Date
    Feb 2007
    Posts
    72

    Default Re: Export float rounded

    Hi Russell

    I sent you an e-mail about this, but though it might be a good idea to have it posted here so others can benefit as well.

    As you know, I recently upgraded my php to version 5.x.

    This float process has now ceased to function.
    Example:
    Code:
    export float    fTileWidth(2,'.',',');
    export float    fTileHeight(2,'.',',');
    These 2 fields are no longer showing only 2 decimal places.
    Example of some displayed results: 73.125" X 52.8125"

    Not sure where to turn

    Thank you
    Nelson

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. using the CSV export only
    By smitz in forum Community Support
    Replies: 1
    Last Post: 02-Oct-2006, 03:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •