Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

Nasal Loops

48 bytes added, 22:00, 25 May 2013
Loop Identifiers
This can be solved by providing each loop chain with a ''loop identifier'' and letting the function end itself if the id doesn't match the global loop-id. Self-called loop functions need to inherit the chain id. So, every time the global loop id is increased, all loop chains die, and a new one can immediately be started.
<syntaxhighlight lang="php">
var loopid = 0;
var loop = func(id) {
...
loop(loopid); # start new chain; this can also be abbreviated to: loop(loopid += 1);
</syntaxhighlight>
[[List_of_Nasal_extension_functions#settimer.28.29|More information about the settimer function is below]]
18,205
edits

Navigation menu