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

Support questions for Flow CSV Viewer and Editor.
Post Reply
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

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

Post 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?
Waveworks
Posts: 175
Joined: Thu Sep 05, 2019 1:05 pm

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

Post 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.
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

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

Post 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.
Waveworks
Posts: 175
Joined: Thu Sep 05, 2019 1:05 pm

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

Post by Waveworks »

Hello, I have now released version 1.1.1, which fixes this issue. Thank you again for reporting it!

Best regards,
Gustaf
Post Reply