Scripting reference · Nerdamer Language

while

Repeats a Nerdamer Scripting body while its condition is nonzero.

The deferred condition is reevaluated before every iteration. The final completed body value is returned, and a loop that never completes a body produces an empty result.

break exits the nearest loop, continue starts the next iteration, and a configurable iteration limit prevents runaway loops.

Examples

These examples use Nerdamer Scripting.

Update parser state until the condition becomes zero.

block(x:0,while(3-x,x:x+1),x)
// → 3

Interfaces

The same operation is available through the interfaces below.

Nerdamer Scripting

Nerdamer Scripting

Use this form in Nerdamer Scripting input passed to nerdamer(...).

while(arg1, arg2)

← Back to Nerdamer Scripting