TdxDynamicItemList.ForEach(TdxDynamicItemListForEachProcRef,Boolean) Method
Applies the specified procedure to a range of items stored within the list.
Declaration
procedure ForEach(AProc: TdxDynamicItemListForEachProcRef; AGoForward: Boolean = True); overload;
Parameters
Name | Type |
---|---|
AProc | TdxDynamicItemListForEachProcRef |
AGoForward | Boolean |
Remarks
Call this procedure to apply a TdxDynamicItemListForEachProcRef anonymous procedure passed as the AProc parameter to items stored within the list. Ensure that the ForEach procedure never accepts nil as the parameter.
The first overloaded variant executes the specified procedure for each item stored within the list, while the second variant allows you to limit the affected range of items by passing its start and end positions as the AStartIndex and AFinishIndex parameters, respectively.
You can pass False as the AGoForward optional parameter to reverse the iteration order – from the item range end to beginning (that is, from LastIndex to FirstIndex, or from AFinishIndex to AStartIndex in the case of the first and second overloaded variants, respectively).
Note
Calling the ForEach procedure has no effect if the list is empty.