Evan,

That works well, for visitors that see this out of context here is an 
example which also demonstrates the use of discontigouse (not continuous) 
ranges.


<$list filter="[range[1,6]][range[12,12]]" variable=inc>
<<inc>>
</$list>


(= [range[1,6]] =) (= [range[12,12]] =)


See more on formulas here 
<https://groups.google.com/forum/#!topic/tiddlywiki/bfInUWhAtzo>

Regards
Tony

On Friday, 22 December 2017 06:40:25 UTC+11, Evan Balster wrote:
>
> Hello, all —
>
> I've written a nifty filter operator for generating numeric ranges in the 
> style of "for" loops.  It's an instant power combo with any math 
> functionality.  I'll be including it in the next release of my formulas 
> plugin <https://github.com/EvanBalster/TiddlyWikiFormula>, but I wanted 
> to make a post here in case anybody searches for something like this 
> specifically.
>
> The module is attached (drag the JSON file to your wiki to import it).
>
>
> Docs:
>
> 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 Formulas <http://localhost:8080/#Formulas>.
>
>
> 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:
>
>    - <end>
>    - <begin>,<end>
>    - <begin>,<end>,<step>
>
> Each part must be a number, and works as follows:
>
>    - <begin>: start counting at this number. Defaults to 0.
>    - <end>: stop counting at this number.
>       - It will be included unless it falls between two steps.
>    - <step>: 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:
>
> [range[7]]
>
>
> 0 1 2 3 4 5 6 7
>
>
> [range[1, 10]]
>
>
> 1 2 3 4 5 6 7 8 9 10
>
>
> [range[17,13]]
>
>
> 17 16 15 14 13
>
>
> [range[1.001, 5, 1]]
>
>
> 1.001 2.001 3.001 4.001
>
>
> [range[.5,1.4,.004]]
>
>
> 0.500 0.504 0.508 0.512 0.516 0.520 0.524 0.528 (...)
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/af5c2827-43dc-4377-bf67-23581e2843a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to