SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Montreal, CA
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to Compare float numbers...

    Hi All,
    I have a string Str1 with value "1.2.1231".
    I have another string Str2 with value "1.2.1234".
    Above two are output's.
    How do I verify which one is higher.
    Thanks,



    ------------------
    ___________________
    Murali K Parepalli
    Intuit
    _ _ ___________ _ _
    Murali K Parepalli

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Compare float numbers...

    Use Val() to convert them to directly-comparable numbers.

    John




    ------------------

  3. #3
    Member
    Join Date
    Apr 2001
    Location
    Montreal, CA
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Compare float numbers...

    Hi John,
    I am getting out put after conversion as 2.100000. Hence, I couldn't use val...
    Any clue...
    Thanks,

    ------------------
    ___________________
    Murali K Parepalli
    Intuit
    _ _ ___________ _ _
    Murali K Parepalli

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Compare float numbers...

    I use some thing like following for checking the versions you can modify as per your requirement,

    Hope it helps
    ------------------


    [This message has been edited by AUTOMATION_GURU (edited 01-07-2003).]

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:04 PM.

Copyright BetaSoft Inc.