Home

Jump statements should not be followed by dead code

Rule description

  • Jump statements should not be followed by dead code

 

Non-compliant Code Example

function string TestFunctionCall (int cnt)

integer A = 1, B = 1
DO WHILE A <= 15
      EXIT; //Non compliant code (Containing dead code, statement below EXIT will never get execute)
      A = (A + 1) * B
LOOP

messagebox('Success','test finished ')

return "

end function
function string rule32InValidTest (string cnt)

return cnt; //Non compliant code (Containing dead code, statement below RETURN will never get execute)

@count = 1 

end function
Visual Expert 2020
 VEPBRULE39