Skip to content

Space around operator of arithmetic expression

Tako Lee edited this page Mar 11, 2014 · 5 revisions
  • No space around arithmetic operator

    Option: fmt094_space_around_operator = false, type: TFmtBoolean.

    SELECT *  
    FROM   dual  
    WHERE  1=-1  
           AND(1!=2  
                OR 2^=3)  
           AND 3<>4  
           AND 4>5; 
  • Space around arithmetic operator

    Option: fmt094_space_around_operator = true, type: TFmtBoolean.

    SELECT *  
    FROM   dual  
    WHERE  1 = -1  
           AND(1 != 2  
                OR 2 ^= 3)  
           AND 3 <> 4  
           AND 4 > 5; 
  • Do not leave any blank spaces preceding or following the ** operator(PL/SQL).

    nRaisedNum := nNum**nPower;

    Reference: http://www.dba-oracle.com/t_plsql_coding_spacing_standards.htm

  • Do not leave blank spaces before or after the plus (+) and minus (-) signs when used as unary operators.

    nNumber := -nSecondNumber;
    nNumber := +nSecondNumber;

    Reference: http://www.dba-oracle.com/t_plsql_coding_spacing_standards.htm

Clone this wiki locally