[QGIS-trac] [Quantum GIS] #2308: Field Calculator Order of Operations

Quantum GIS qgis at qgis.org
Mon Dec 21 19:50:17 EST 2009


#2308: Field Calculator Order of Operations
---------------------------------------------------------+------------------
   Reporter:  jpalmer                                    |              Owner:  mhugent      
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.4.0
  Component:  Vectors                                    |            Version:  HEAD         
   Keywords:                                             |   Platform_version:  WinXP SP2    
   Platform:  Debian                                     |           Must_fix:  Yes          
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 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!

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2308>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list