![]() ![]() If you have no need to access the loop counter variable in the statement block, you don’t even need to define one! Just use an underscore character where you would normally put the loop counter variable name. The basic syntax of the FOR loop in PowerBuilder is: FOR varname = start TO end Trying to force everything into a FOR loop isn’t always the best approach… It’s really important to understand what you’re trying to achieve in the code before you select the loop syntax that you’ll be using. ![]() They differ in one basic aspect: the FOR loop is used when a block of code is to be executed over a specific number of iterations, and the DO loop executes a block of code until a specific condition is satisfied. There are essentially two basic types of loops – the FOR loop and the DO loop. Loops are a critical part of every programming language, and all of them (at least those that I’ve worked with) do things a bit differently. If you want to start at the beginning, here are Part 1 and Part 2. ![]() In this third installment of the series, we’ll compare and contrast the different types of Loop constructs available in both PowerScript and Swift.
0 Comments
Leave a Reply. |