Fastloop
Fastloops are Click loops similar to other languages' for or repeat loops, and allow a certain group of actions to run an arbitrary number of times. A fastloop takes two parameters, a name (string) and how many times it should run (integer). Fastloops' indexes always start at 0, and they always increment by 1. Running a loop a negative number of times will obviously cause the application to freeze, unless other events cause the loop to stop.
Fastloops are almost required for many types of things, such as engines. As the screen is not refreshed until after the loop is completed (because the loop pauses the entire event list), the only the result of the very last iteration will generally be seen. Fastloops are also required for avoiding many problems encountered with object selection
Though TGF/MMF lack other loop types (while, etc), they can be emulated with fastloops:
- While loop
[loop starting condition]
--> Start Loop: "While"; -1
On loop "While"
+ Loopindex("While") < [some value; comparison operator could also be changed]
--> [action]
On loop "While"
+ [same condition as above, but with opposite comparison operator]
--> Stop loop: "While"