Bug report #2308

Field Calculator Order of Operations

Added by Jeremy Palmer almost 15 years ago. Updated almost 15 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12368

Description

The order of operations in the field calculator is wrong and does not follow the general precedence rule, that division and multiplication come before addition and subtraction.

i.e try 1+2*3.

QGIS produces 9!

History

#1 Updated by Martin Dobias almost 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in 9fc31d46 (SVN r12579)

Also available in: Atom PDF