How do I convert from string to double in an array?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monkeyinquisition
    New Member
    • Oct 2006
    • 2

    #1

    How do I convert from string to double in an array?

    I have an array (string) like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9

    And I want to convert it to array (double). How can I do this?

    PS Array1(i)=Array 2(i) doesn't seem to work!
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by monkeyinquisiti on
    I have an array (string) like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9

    And I want to convert it to array (double). How can I do this?

    PS Array1(i)=Array 2(i) doesn't seem to work!
    You must 'cast' the string to a numeric variable using the built in casting functions. In this case you need the CDbl() function

    Code:
    ArrayDouble(i) = CDbl(ArrayString(i))

    Comment

    Working...