On Friday, February 15, 2019 at 9:36:26 AM UTC-8, Mohammad wrote:
>
>  But we do not know in advance what is the number, and it is given by user!
> So if n is a variable, then how we can generate these numbers?
>
>>
If we DID know the number in advance, we could just use it in the operand 
of the range[...]

For example, suppose the desired number is, say, 256.  Then we could just 
modify the filter be:
[range[9]addprefix[00]] [range[10,99]addprefix[0]] [range[100,256]]

However, since you want the number to be "given by user", we need to use a 
different approach.  Instead of hard-coding the number, we can use the 
limit[...] filter.  Let's suppose the desired number is in variable called 
"max".  Then we could write:
[range[9]addprefix[00]] [range[10,99]addprefix[0]] [range[100,256] +limit
<max>] 

and if the desired number is in a tiddler (e.g. $:/temp/input/userlimit, as 
a result of user input), we could write:
[range[9]addprefix[00]] [range[10,99]addprefix[0]] [range[100,256] +limit{$:
/temp/input/userlimit}]

-e

-- 
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/1350d354-12d7-4756-98cf-d0c9ec3992e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to