Home

Functions Or Events should not have too many parameters

Rule description

  • Functions Or Events should not have too many parameters

 

Non-compliant Code Example

private function string TestFunctionCall (string p1,string p2,string p3,string p4,string p5,string p6,string p7,string p8,string p9,string p10,int cnt)//Non compliant code (Allowed less than 10 number of parameters in the function or events)

return cnt

end function

Compliant Code Example

type s_parameters from structure
	string		p1
	string		p2
	string		p3
	string		p4
	string		p5
	string		p6
	string		p7
	string		p8
	string		p9
	string		p10
	int		    cnt
end type

private function string TestFunctionCall (s_parameters p)//Compliant code

return cnt

end function
Visual Expert 2020
 VEPBRULE52