# Qustion:

Discussion in 'ASP General' started by Need_help, Aug 29, 2003.

1. ### Need_helpGuest

ASP Q:

I have an array with some values.

so I have values

Value(0,1)
Value(0,2)
Value(0,2)
....etc.

since the values are different size, I'm using

left(values(0,1),7)

So I can take first 7 digits out.

Normally I'm looping through the array and I'm using form like this:

CDbl(Left(CStr(values(0, 1)),7))

Everything goes perfect, but when I put m insted of 1

check = True : m=1
do
do while n<59
value1= CDbl(Left(CStr(values(0, m)),7))

m=m+1
if n=58 then
check = False

exit do
end if
loop

returns message like this:

Type mismatch: 'CDbl'

How I can solve this so I can get normal value so I can for e.g. add 1 to
value 1

Thanx

Need_help, Aug 29, 2003

2. ### Evertjan.Guest

Need_help wrote on 29 aug 2003 in
microsoft.public.inetserver.asp.general:

> check = True : m=1
> do
> do while n<59
> value1= CDbl(Left(CStr(values(0, m)),7))
>
> m=m+1
> if n=58 then
> check = False
>
> exit do
> end if
> loop
>

the value of m will go up to 2, 3, 4, 5, ...
and the array is not that big.

but the value of n stays what it was, when/if you initialized it and
never reaches 58

> How I can solve this so I can get normal value so I can for
> e.g. add 1 to value 1

m = 1 + 1

solution:

please tell us what you realy want to accomplish

--
Evertjan.
The Netherlands.