You are here: Symbol Reference > MtxForLoop Namespace > Classes > TMtxForLoop Class > public > TMtxForLoop.CombinedLoopIndex Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxForLoop.CombinedLoopIndex Method

Returns combined loop iteration Index to determine the progress of the computation.

Pascal
function CombinedLoopIndex: integer;

When processing a range loop (threaded function has min and max parameters) it is the users responsability to update Thread.LoopIndex variable, if this indicator is required. Example: 

IntInterlockedIncrement(Thread.LoopIndex); 

This is because the actual loop runs within the users code. This function will return the sum of iterations added to the starting Min value. 

In case of a while-loop, the CombinedLoopIndex and CombinedLoopCount returns the same result. The user is not allowed to increase Thread.LoopIndex 

In case of a for-loop without specified range the function will return the sum of iterations added to the starting Min value. The user is not allowed to increase Thread.LoopIndex

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!