Jump to content

BSL:Manual: Difference between revisions

229 bytes added ,  6 December 2015
→‎Recursive calling: explaining difference between recursive calling and using "fork" to get a loop
(→‎fork: wording; removing note about sleep from here, because it belongs in the "Loop" section)
(→‎Recursive calling: explaining difference between recursive calling and using "fork" to get a loop)
Line 471: Line 471:


===Recursive calling===
===Recursive calling===
A function can call itself, which is useful for various looping behavior, but a function can only call itself up to about four times.
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.


===Returning===
===Returning===