Wiki

Clone wiki

symja_android_library / Symbols / Do

Do

Do[expr, {max}]
evaluates expr max times.
Do(expr, {j, max})
evaluates expr max times, substituting j in expr with values from 1 to max.
Do(expr, {j, min, max})
starts with j = min.
Do(expr, {j, min, max, step})
uses a step size of step.
Do(expr, {j, jmin, jmax, jstep}, {k, kmin, kmax, kstep}, ...)
evaluates expr for each k from kmin to kmax, for each j from jmin to jmax, etc.

Related terms

Break, Continue, CompoundExpression, For, If, Return, While

Updated