This document discusses For...Next loop structures in Visual Basic. It defines a For...Next loop as using a counter variable that increments each loop iteration to execute statements a known number of times. The document outlines the guidelines for For...Next loops, including that the counter starts at a start value, checks if it is greater than an end value before each iteration, and increments by a specified amount or 1 if not specified. An example For...Next loop is provided that prints numbers from 10 to 20.
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
For...next loop structure
1.
2. At the end of this Presentation, you
should be able to:
1. Define a For…Next Loop Structure
2. Understand the guidelines for a
For…Next Loop Structure
3. Construct the syntax of For…Next
Loop Structure
3. For…Next Loop Structure
• The For … Next is used when you
know how many times the statements
of the loop will be executed. It used
a variable that serves as a counter
that increases or decreases in value
every time there is a loop.
4. For…Next Loop Structure Guidelines
• In the For … Next Loop execution:
» The counter is set to the value of start.
» Counter is checked if it is greater than the
end. If yes, it passes to the statements after
the Next, if not, the statements are
executed.
» The counter is incremented by the amount
specified, if not specified, the counter is
incremented by 1.
» Counter is incremented and goes back to step
b.