2010-09-14 10 views

Répondre

6

Vous pouvez utiliser STEP:

for x = 0 to 100 step 10 

next x 

Cela vous mènera à travers 0, 10, 20... 100

Puisque vous voulez commencer à 1 et aller 1, 10, 20... 100, voici une légère modification

for x = 0 to 100 step 10 
    if x = 0 then 
     y = 1 
    else 
     y = x 
    end if 

    '// use y in all calculations downstream instead of x 

next x 
0
For y = 0 To 10 
    If y = 0 Then x = 1 Else x = 10 * y 

    ' do stuff with x 

Next y