Wiki

Clone wiki

symja_android_library / Symbols / For

For

For(start, test, incr, body)
evaluates start, and then iteratively body and incr as long as test evaluates to True.
For(start, test, incr)
evaluates test and incr no body.

Examples

>>> For($k= 1, $k <= 64, $k*=2, If($k <= 8, Continue(), Print($k)))
16
32
64

Related terms

Break, Continue, CompoundExpression, Do, If, Return, While

Updated