Added to TW-Scripts with the explanation by Matt!

--Mohammad

On Friday, April 5, 2019 at 3:48:16 PM UTC+4:30, S. S. wrote:
>
>
> When trying to test for an *either/or* parameter, I used a filter, and 
> found this interesting behaviour:
>
> \define test1(a b)
> <$list filter="[[$a$]] [[$b$]] +[limit[1]]" emptyMessage="c"></$list>
> \end
> \define test2(a b)
> <$list filter="[enlist[$a$]] [enlist[$b$]] +[limit[1]]" emptyMessage="c"
> ></$list>
> \end
>
> !! Test 1
> 1. <<test1 a:A   b:B>>   <br>
> 2. <<test1 a:A   b:"">>  <br>
> 3. <<test1 a:""  b:B>>   <br>
> 4. <<test1 a:""  b:"">>  <br>
>
> !!Test 2
> 1. <<test2 a:A   b:B>>   <br>
> 2. <<test2 a:A   b:"">>  <br>
> 3. <<test2 a:""  b:B>>   <br>
> 4. <<test2 a:""  b:"">>  <br>
>
>
> Test 1
>
> 1. A
> 2. A
> 3.
> 4.
>
> Test 2
>
> 1. A
> 2. A
> 3. B
> 4. c
>
> Perhaps useful too keep in mind!
>
> Cheers
>
>
>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/de230c2c-c435-4080-a782-a888af42b9e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to