Counter issue



HI All,

Is there anyone can explain what’s that mean for below “counter+2”,“counter+4” here?

Create variable counter, variable type is int32. assign counter=0
line.Contains(“Date Time Purchase Location Ref No. Product Litres Amount (RM)”), is true

then if
listOfLines(counter + 2).Contains(“Card Total”), is true
then assign
a=listOfLines(counter + 4).Replace("/","")
b=listOfLines(counter + 6)

thank you!


Hi @joyozou,

Counter representing the index of the ‘listOfLines’ array, basically this is used to increment and move on.
Counter initially is 0, then it is becoming 2 by Counter + 2, so it will take the line which is in the index 2 of ‘listOfLines’.

This will increase based on your program.,