Results 1 to 11 of 11

Thread: Decimal separator with VB6

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    PORTUGAL
    Posts
    18
    I want to know what kind of decimal separator is being used in a CPU from a VB6 routine.
    How can I do this?

    My best regards

    José Nogueira
    Eng. José Nogueira
    Mail: janogueira@ipt.pt
    Web: planeta.clix.pt/janogueira
    Entroncamento-Santarém-PORTUGAL

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    I suppose the first question I should ask is "Why?"

    What difference does it make how the calculation is processed in the CPU providing the figures it comes up with are correct..?

    At the lowest level it's only voltage changes in a wire anyway..!!
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Operating System

    I'm sure you don't mean CPU. The CPU does not use decimal seperators, it uses floating point maths, and it is not in decimal format at all.

    Only when the operating system receives the results does decimal format become relevant. The operating system will display the result with the decimal seperator of the users choice. In the case of the Windows operating system, this choice is set in the regional settings. You have to read the regional settings for the specific user to determine what the seperator is.

    Shrog

  4. #4
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64
    The decimal seperator is stored in the registry on NT..

    HKEY_CURRENT_USER\Control Panel\International\sDecimal

    and on 98/95 you can get it from the file win.ini..

    [intl]
    sDecimal=.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    BTW, whats the usual sDecimal you have since i have:

    sDecimal=,

    i've always had that and it's kind of disturbing when you get commas as results of vb calculations and have to enter points.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64
    UK seetings, sDecimal=.

    I think everywere else uses a comma

  7. #7
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Cool .

    South Africa Setting: sDecimal=.

    Africa Rules!


    Shrog


  8. #8
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Unhappy

    damn, maybe i have to change..
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  9. #9
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Yep guys, here in Holland we have the comma too!
    But I just want to say it sucks that the UK wants to do every not-standard (plugs, screws, driving left, weights, mesurements, not even the Euro?! (oh.. am I right?))

    I think we have to ban the UK from europe as long as they don't comply with 'the' standards

    hehe just kidding, but it can be quite annoying when you want to use your discman in london and the plug doesn't fit!?!

    And if they say you can buy 1 foot of licorice I don't even know how long it is!
    And when I want to know how big my monitor is, I want to hear it in CM! not Inches

    hehe ok I'm overacting.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  10. #10
    Lively Member
    Join Date
    Jul 1999
    Posts
    87

    Thumbs up

    sDecimal=,

    Here in Sweden !

    Thank you, Jerry.

    Homepage: http://fraxionsoftware.cjb.net
    ICQ: 40269591
    Mail: Contact Me

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    hehe cool, maybe i change back to , since the majority have ","'s now
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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