Scripting reference · Nerdamer Language

for

Runs a four-part Nerdamer Scripting loop.

for evaluates its initializer once, then reevaluates the condition before each iteration. After a completed body the update expression runs before the next condition check.

continue still runs the pending update; break and return skip it. The same loop-iteration limit used by while applies.

Examples

These examples use Nerdamer Scripting.

Accumulate values across a finite loop.

block(k:0,total:0,for(k:0,4-k,k:k+1,total:total+k),total)
// → 6

Interfaces

The same operation is available through the interfaces below.

Nerdamer Scripting

Nerdamer Scripting

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

for(arg1, arg2, arg3, arg4)

← Back to Nerdamer Scripting