Home

Redundant pairs of parentheses should be removed

Rule description

  • Redundant pairs of parentheses should be removed

 

Non-compliant Code Example

function string TestFunctionCall (string cnt)

int @count  = ((3 + 1)); //Non compliant code

int x;
int y;

IF (x > 0) AND ((x+y > 0))  THEN //Non compliant code
	messagebox('Success','(x > 0) AND ((x+y > 0))') 
ELSEIF  ((x+y > 0)) THEN //Non compliant code
	messagebox('Success','((x+y > 0))') //Non compliant code
ELSEIF  (x > 0) OR ((x+y > 0)) THEN //Non compliant code
	messagebox('Success','(x > 0) OR ((x+y > 0))')
ELSE
	messagebox('Failed','select at least one ')
END IF;

return cnt

end function
Visual Expert 2020
 VEPBRULE51