Functions Documentation | |
Name | loop |
Syntax | (loop condition exp) -> value of last expression |
Argument List | condition: The function keeps on running as long as the condition is not Nil. exp: The expression you want to evaluate as long as the condition is not Nil. |
Returns | Whatever the last evaluated expression returns. |
Category | iteration |
Description | Evaluates the expression over and over until the condition is Nil. The expression will never be evaluated if the condition starts as Nil. |
Example |
(block (number) (setq number 1) (loop (ls number 5) (block Nil (setq number (add 1 number)) (dbgOutput number) "yay" ) ) ) Displays on the debug console. 2 3 4 5 Returns the string yay. |
Comment | Basic iteration function. Not as useful do to the more advanced iteration functions doing the things that you would do with a loop. |
Mod of the Month (February '24) |
Featured Mods (random) |
RPC's Utility Items Pack |
Agauptera-class yacht |
Quality Mods (random) |
BattleZone |
Repair droids |
Balanced Mods (random) |
TX2 Centauri Module |
System Map Scanner Pack 1.0 |