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 (January '19) |
Latest Mods |
Big Mules |
Commanders Log |
Playership Drones Alpha |
Corporate Traffic |
Identify Before Buying and Selling V2 |
Featured Mods (random) |
Raptor: Call of the Shadows |
Lego ship yellowjacket |
Quality Mods (random) |
"PDmod" ICX Overhaul |
Angelus-class Explorer |
Balanced Mods (random) |
Molotok-class heavy gunship |
Agauptera-class yacht |