By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

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

P: 2
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)=Array2(i) doesn't seem to work!
Oct 31 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 1,646
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)=Array2(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

Expand|Select|Wrap|Line Numbers
  1. ArrayDouble(i) = CDbl(ArrayString(i))
Oct 31 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.