[Bug 4196] Bug in expression parser

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
babaroga
Posts: 79
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

[Bug 4196] Bug in expression parser

Postby babaroga » Sun Nov 17, 2019 11:34 pm

Lately, expression parser is not working with "/" sign any more.

When I try to enter eg. 12/2 in some of dimension fields, textbox does not accept "/" sign after first member in expression. It works on second member eg. 12+12/2.
All other operations +, -, *, sqrt etc works OK.

Screenshot_20191118_001959.png
Screenshot_20191118_001959.png (22.99 KiB) Viewed 93 times


So, try to type in any of eg. X, Y or Z:
12/2 - does not work
(12+5)/2 - does not work
(12)/2 - does not work
12+3/2 -works


Screenshot_20191118_002046.png
Screenshot_20191118_002046.png (24.31 KiB) Viewed 93 times


Everything works OK if I type it as formula

Screenshot_20191118_002248.png
Screenshot_20191118_002248.png (40.65 KiB) Viewed 93 times

My FreeCAD was built from master 30 mins ago

Code: Select all

OS: Manjaro Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18753 (Git)
Build type: Release
Branch: master
Hash: c0a80e1a9a5683404fe506201d0ee74b28ea819d
Python version: 3.7.4
Qt version: 5.13.2
Coin version: 4.0.0a
OCC version: 7.4.0
Locale: English/United States (en_US)
Should I file a Bug report?
Last edited by babaroga on Fri Nov 22, 2019 5:32 pm, edited 1 time in total.
chrisb
Posts: 19484
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug in expression parser

Postby chrisb » Sun Nov 17, 2019 11:47 pm

I can confirm. If I remove the the dimension "mm" then 12/2 is accepted.
chrisb
Posts: 19484
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug in expression parser

Postby chrisb » Sun Nov 17, 2019 11:51 pm

It still worked in 0.19.17798.
User avatar
babaroga
Posts: 79
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: Bug in expression parser

Postby babaroga » Mon Nov 18, 2019 1:06 pm