Bug in #For when using #Delete

Found a bug in the #For() template command which intermittently doesnt delete all instances.

Its like the internal counter gets messed up after the delete, ie record 2, delete record 2, record 3 becomes record 2 and then the #For fetches record 3, skipping the replacement record 2.

As #For is mainly used with builtin symbols which cant be deleted, this might explain why it exists.

#For(%MultiSymbol)
#Delete(%MultiSymbol)
#EndFor

Wont delete all instances of the %MultiSymbol.

I wouldn’t call that a “bug”, but rather a typical quirk of looping logic. That’s why so many of my loops are written to go backwards, which you could do with the Reverse attribute:

#For(%MultiSymbol),Reverse
  #Delete(%MultiSymbol)
#EndFor