I've been into toying with run prefixes for my filters, to see what I can 
now do with them.

I've been able to have an equivalent of "if not A then B" but I've not been 
able to get "if A then B". the + or :and prefix is not a logical AND at all 
but just a way to replace all currents stuff in the pipe with new contents.

Part of the problem is I can't produce NOT A. I mean, see this example:

{{{
cobalt great gaz :filter[split[]match[r]] 
+[!is[blank]then[]else["great" void]]
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]] 
+[!is[blank]then[]else["fox" void]]
~Unexpected
}}}

The only output is "fox" void. I expected that the first filter output be 
Expected.

As a kind of check with

{{{
cobalt great gaz :filter[split[]match[r]] 
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]] 
~Unexpected
}}}

the output is
great
Unexpected
which is totally what we thought we should have.

The same also happens with

cobalt great gaz :filter[split[]match[r]]
+[!is[blank]]
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]]
+[!is[blank]]
~Unexpected
}}}

Again, that's OK. Maybe that's because [] is not a blank input? But 


{{{ [[]] +[!is[blank]then[Full]else[Empty]] }}}

does indeed output Empty as expected so I'm really confused now...

BTW, in real life, in "if A then B" my B is not a constant, in which case I 
would have used [A]!is[blank]then[B] but a complex run. I know I can have a 
function or variable as my B to get around the difficulty, but that is not 
what I want to do here.

-- 
Jean-Pierre


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e0f75d55-b7bb-4478-bc5c-8b38b56baea8n%40googlegroups.com.

Reply via email to