Results 1 to 3 of 3

Thread: Help Fix,Int,Round?

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2003
    Posts
    48

    Question Help Fix,Int,Round?

    Hi All
    If my resulting number is a negative one i.e
    variation.text = -23.214 I need it to be 24
    and if the number is positive i.e
    variation.text = 23.214 I need it to be 23
    How do I go about solving this?
    thanks
    Rob

  2. #2
    Member sgarv's Avatar
    Join Date
    Jul 2012
    Posts
    34

    Re: Help Fix,Int,Round?

    Using the immediate window I get:

    ? int(23.214)
    23

    ? int(-23.214)
    -24

    If you need your result to be positive (absolute number) then use abs() function to get final result:

    ? abs(int(23.214))
    23

    ? abs(int(-23.214))
    24

    Does that help? SgarV

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2003
    Posts
    48

    Smile (RESOLVED)Re: Help Fix,Int,Round?

    Thanks for your prompt reply, it worked a treat.
    Keep up the good work
    Rob

Posting Permissions

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



Click Here to Expand Forum to Full Width