An example Application of for Loop in VB language
This article mainly introduces "the example application of VB language for cycle". In the daily operation, I believe that many people have doubts about the example application of VB language for cycle. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the example application of VB language for cycle". Next, please follow the editor to study!
Knowledge objectives of this section:
Enter a number in the text box, click the output button, and print out the five-pointed lattice square on the form. Experience the power of the double for cycle.
Effect picture
The format of the for loop:
Declare a custom variable I
For initializes the last value of the custom variable I to variable I step step size
Here is the code to enter the loop
Next custom variable I
For example:
Dim i as integer
For iTunes 0 to 10 step 1
Print i
Next i
Results:
0
one
...
ten
Conclusion:
Initial variable