18,700
edits
(clarifying that strings don't do comparison properly, and linking to Loser's nearly-orphaned article) |
m (link fixes) |
||
Line 574: | Line 574: | ||
===Recursive calling=== | ===Recursive calling=== | ||
A function can call itself, which is useful for various looping behavior, but a function can only call itself recursively up to about four times. Note that this limit is bypassed if you use "[[# | A function can call itself, which is useful for various looping behavior, but a function can only call itself recursively up to about four times. Note that this limit is bypassed if you use "[[#fork|fork]]" to call a function from within itself, but this no longer counts as recursing because the logic will not complete in a predictable inside-to-outside order. For a non-recursive way to loop a function, see [[#Looping|Looping]]. | ||
===Returning=== | ===Returning=== | ||
Line 606: | Line 606: | ||
===Looping=== | ===Looping=== | ||
The following function creates a loop using "[[# | The following function creates a loop using "[[#fork|fork]]". | ||
var int counter; | var int counter; |