Calculation with minus


If I need a minus something in calculation (e.g. Amount < -20000),
I understand I must use a : Amount < (0-1) * 20000
Is there something planned in the next versions ?


Hi Michel,

in the expression you mentioned you can use [Amount] < (0-20000).

No support for the unary minus is planned for any time soon.

Thanks Dmitry!
It’s a surprise for some customer who find that strange… That was the reason of my question.

It is somewhat inconvenient, I agree. We will revamp entire expression syntax as some point with some interesting features like local reusable expressions and optional parentheses in functions, and add support for the unary minus. It’s just not on our priority list at this point because current expression model doesn’t support unary minuses and redesigning the model would be a significant effort while there is a simple workaround.

Hi Dmitry,

I understand that it can be quit an effort to change this but it seems essential to make the change to the unary minus while making it possible that the old expressions eg (0-200) for -200 keep working so that end users do not have to migrate all their code. I have never seen other software that works in this manner on that aspect

I support Michel for this feature request :slight_smile: !

Also some syntax highlighting would be helpful in the future.

There’s also the problem that when running a comparison operator on empty() values it throws an error. This seems not to be necessary. Once you replied me that I should avoid this by checking if the variable is numeric first. This is also a bit laborious for just doing a simple comparison.

But I am hopeful for future releases of easyMorph !

Kind regards