467,874 Members | 1,728 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,874 developers. It's quick & easy.

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)=Array2(i) doesn't seem to work!
Oct 31 '06 #1
  • viewed: 7869
Share:
1 Reply
1GB
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.

Similar topics

4 posts views Thread by cindy liu | last post: by
16 posts views Thread by Khuong Dinh Pham | last post: by
17 posts views Thread by David Scemama | last post: by
10 posts views Thread by Nikolay Petrov | last post: by
43 posts views Thread by Steven T. Hatton | last post: by
14 posts views Thread by Web learner | last post: by
2 posts views Thread by =?Utf-8?B?YW1pcg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.