Thank you @Mark. It seems the {{{filter...}}} has a lot of potential to
create conditional statements. The actual use case was based on the user
interaction a set of classes shall be applied to few html tags. I used the
dictionary tiddler, but for small use cases I like your approach.
@Tones,
Mohammad,
I know your example is more a general example, but if we look at the
specific example translating a number to a number-word we have the
advantage that the input is an integer.
\define number-words() one two three four five six seven eight nine
<$list filter="[range[1,9]]">
<> {{{
Mat,
Thank you! Well yes a dictionary tiddler can be used. I have used such a
solution in my recent plugin Tamasha.
I also implement the switch-case using your proposed solution. Really
powerful.
By the way, there are situations where the operands are not constant. I
just tried to see how I can
Thank you Jed,
I have not used the lookup operator, seems promising. I will give a try.
Best wishes
Mohammad
On Sun, Jan 24, 2021 at 2:41 PM Jed Carty wrote:
> I don't see anything wrong with using that macro, but I do have an
> alternative that I think is more flexible.
> Depending on the
4 matches
Mail list logo