Iterates a value for a certain number of times.
For &var = start to end [step leap]
Is a variable based on the Numeric data type.
Are numeric expressions showing the start and the end of the loop.
Specifies the leap of the loop.
Is a constant value.
Sequence of valid language commands.
Objects: Procedure, Transaction, Web Panel
Generators: .NET, .NET Framework, Java, RPG, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
This command allows iterating a value for a certain number of times. It is a loop from the start value of &var and it increases a leap, as long as &var is <= than end. The leap default value is 1, but it can also be a negative number.
- As it's usual in GeneXus, the scope of the loop variable is the whole object
- The value of the loop variable outside the loop is not defined/documented and may change through platforms and versions.
&Tabs = LoadPageTabs(&PageType, &PageFullName, &PageId, &PageLastVersionId1)
// Select the subset of tabs that will be shown.
&FirstTab = 1
&LastTab = &Tabs.Count
&IsFirstTab = True
For &Index = &FirstTab To &LastTab
&Tab = &Tabs.Item(&Index)
&IsFirstTab = False