Kodi Community Forum

Full Version: Combined Expressions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Are Combined Expressions supported? I've got some really complex expressions that I'd like to break into small chunks.

eg.

Code:
<expression name="test1">........</expression>
<experssion name="test2">........</expression>

<expression name="final">$EXP[test1] + $EXP[test2]</expression>

------------------------------------------------------------------------------------------------

Answered my own question..... Yes they are supported Big Grin
Just make sure that you wrap the entire expression in square brackets.
e.g.
Code:

<expression name="exp1">[Cond1 | Cond2]</expression>
<expression name="exp2">[Cond3 + Cond4]</expression>
<expression name="exp3">!$EXP[exp1] + $EXP[exp2]</expression>

Because that will make sure that exp3 equals
![Cond1 | Cond2] + [Cond3 + Cond4]

But if you hadn't wrapped in the square brackets then you would get a very different overall condition:
!Cond1 | Cond2 + Cond3 + Cond4
Yep, that's why I asked if combining expressions was supported, I spent a couple of hours before I posted pulling my hair out wondering why it wasn't working only to realise just after posting that my sub-expressions need to be enclosed in brackets.

Thanks Big Grin