• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using Do Loops

For...Next loops are useful when you can specify the number of times that you need to repeat an action. But sometimes you don’t know in advance how many times you want to repeat something. For those times, there’s the Do looping structure.

Creating a Simple Do Loop

This first Do loop prints a chart showing the amount to be billed for one hour, two hours, and so on through eight hours at a specific hourly rate:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint