Page 1 of 1

Why can't I subtract a constant in an expression?

Posted: Wed Sep 29, 2021 10:07 pm
by MrFlow256
I have a column

Code: Select all

buyPrice
. If I enter an expression

Code: Select all

b=buyPrice*2
this works great. If I replace '*' with '+' it works. If I change it to '-' I get "Unexpected 'buyPrice-2', expected expression".

Is this a known issue, any ideas?

Re: Why can't I subtract a constant in an expression?

Posted: Thu Sep 30, 2021 7:00 am
by Waveworks
I have checked and can confirm that this is a bug that affects subtraction of numeric constants from variables ending with an 'e' and when no spaces are used around the minus sign. As a workaround, add a space before or after the minus sign and it should work.

Sorry about this and thank you very much for letting me know! I'll fix this for the next version.

Re: Why can't I subtract a constant in an expression?

Posted: Thu Sep 30, 2021 8:44 am
by MrFlow256
That's a fun bug!

I just checked and (buyPrice)-2 also seems to work, I thought I already tried that last night but it must just have been alte and my brain wasn't working. Thanks for the help.

Re: Why can't I subtract a constant in an expression?

Posted: Thu Mar 03, 2022 6:20 pm
by Waveworks
Hello, I have now released version 1.1.1, which fixes this issue. Thank you again for reporting it!

Best regards,
Gustaf