Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: Gianni en Noviembre 06, 2013, 08:52:16 am
-
Hi
I need to convert this line of Javascript code in vb6:
poly.latitude.length is an array of single value
for(var c = false, i = -1, l = poly.latitude.length, j = l - 1; ++i < l; j = i)
How implement for next cycle?
i=-1
l=Ubound(array)
j=l-1
For i = -1 to l
'Some stuff
j=i
next i
is this correct?
-
Hi.
I don't know if it does exactly what the javascript line does. What about "c = False"?
Anyway, I would do it like this:
l = Ubound(array)
For i = -1 to l
'Some stuff
j = i
Next i
i=-1
Why this? It is not necessary.
j=l-1
Why this? You don't use j until you do j = i.
j=i
Why this? You don't use j anywhere else.
Maybe there is some more code you did not provide.
-
Thanks I have resolved