March 2018
Beginner to intermediate
514 pages
13h 11m
English
Contrary to the control statement For... Next, For Each... Next will iterate a number of known times but instead of iterating through numbers, it will iterate through a list of values.
The syntax of For Each... Next is:
For each var in list [statements] [exit for [ ( when | unless ) condition ] [statements] next [var]
As with the For... Next control statement, For Each... Next also allows exiting the loop by using the exit for statement.
The list argument can have values separated by a comma, but it can also have the following syntax:
list := item { , item }item:=constant | (expression) | filelist mask | dirlist mask | fieldvaluelist mask
Where:
|
constant |
Any number or string. Note that a string written directly in ... |
Read now
Unlock full access