#repeat() loop optimization - does the <expression> get processed every iteration?

1 messages · Page 1 of 1 (latest)

jolly pivot
#

See title - for the example below, would the <expression> get processed/calculated on every iteration of the loop?

repeat (<expression>) { <statement>; }

Thanks! 🫡

stark palm
#

No it is evaluated once when the loop is entered - the value of the expression is the number of iterations