Jump to content

BSL:Manual: Difference between revisions

No change in size ,  5 April 2021
m
link fixes
(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 "[[#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]].
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 "[[#Fork|fork]]".
The following function creates a loop using "[[#fork|fork]]".


  var int counter;
  var int counter;