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


Jump to: navigation, search

Nasal Loops

349 bytes added, 17:00, 16 May 2016
skip or exit loops prematurely
print( c += 1 );
print("end of loop\n");
== skip or exit loops prematurely ==
If you want to skip a single loop use "continue" or to exit a loop prematurely use "break".
<syntaxhighlight lang="nasal">
for (var i=0; i < 10; i+=1) {
# loop body
# don't do loop for i == 3
if ( i == 3 ) continue;
# exit for other reason
if ( want_to_quit ) break;

Navigation menu