created: 20171221184734665 modified: 20171229211834620 tags: [[Filter Operators]] [[Negatable Operators]] title: range Operator type: text/vnd.tiddlywiki caption: range op-purpose: generate a range of numbers op-input: ignored op-parameter: a range specification, like `[1,5]` op-parameter-name: N op-output: a series of evenly spaced numbers ranging from `` to `` \define range_example(range) ``` [range[$range$]] ``` <$list variable=n filter="[range[$range$]]"><> \end The `range` operator allows a range of numbers to be enumerated, similar to a `for` loop in other programming languages. It's useful in combination with the [[Formula Plugin]]. |!Purpose|produce a range of numbers| |!Input|ignored.| |!Parameter|1-3 numbers separated by `,` or `;`.| |!Output|A range of numbers starting with | |!`!` Output|As ''Output'', but with order reversed.| The parameter has three forms: * `` * `,` * `,,` Each part must be a number, and works as follows: * ``: start counting at this number. Defaults to 0. * ``: stop counting at this number. ** It will be included unless it falls between two steps. * ``: count up (or down) by this amount. ** It may be negated so it counts in the right direction. ** It cannot be zero. The number of decimal points in the output is fixed, and based on the parameter with the //most// decimal points. To prevent the browser from freezing, `range` is currently limited to 10,000 values. !!Examples <> <> <> <> <>