Attached is a document I've written covering the use of loops in AmiBroker's AFL.
It starts off discussing arrays and array indexing, then progresses to looping, the different types of loop constructs, the switch & case construct (new in version 4.91.0 Beta), and finally a few real examples.
It's aimed at AmiBroker users who already have a basic knowledge of programming AFL but would like to learn how to use loops.
Feedback from both experienced programmers and beginners welcome, to let me know if I've made any mistakes or have anything wrong, and whether it's logical and easy to follow for someone who's not already familiar with the topic. I've tried to make it progress step by step, but may have unwittingly made some of the steps giant leaps.
The document may be freely distributed.