Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. string to double

string to double

Scheduled Pinned Locked Moved Visual Basic
c++question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    macmac38
    wrote on last edited by
    #1

    Hi, when converting a string to double value i am losing my comma: Dim str as string Dim value as double set str = "123.451" value = CDbl(str) output: 123451 anybody has a solution? happy coding, -mark
    os win2000 vba office 2003, vc++ 6.0

    R 1 Reply Last reply
    0
    • M macmac38

      Hi, when converting a string to double value i am losing my comma: Dim str as string Dim value as double set str = "123.451" value = CDbl(str) output: 123451 anybody has a solution? happy coding, -mark
      os win2000 vba office 2003, vc++ 6.0

      R Offline
      R Offline
      RichardGrimmer
      wrote on last edited by
      #2

      I would guess that this behaviour is by design. A Double datatype is only capable of storing a NUMBERIC value. A comma is not a number, and hence it cannot be stored. Only way to represent the comma is to store it in a string "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups