‎2014 Jun 26 12:28 PM
Hi All,
Can anyone suggest me how to resolve the below issue when I am doing EPC check.
Issue: Insert a constant for the numerical literal 30.
Thanks in advance.
Regards,
Chakradhar.
‎2014 Jun 26 12:32 PM
You've defined a numerical literal 30 in your code, the Extended Program Check is recommending you replace this with a constant.
‎2014 Jun 26 12:32 PM
You've defined a numerical literal 30 in your code, the Extended Program Check is recommending you replace this with a constant.
‎2014 Jun 26 1:00 PM
Hi Nick,
Thanks for ur reply. But the problem was I have nearly 17 numerical literals in my program it is burden again to declare constants and replace those values with constants.
Regards,
Chakradhar.
‎2014 Jun 26 1:34 PM
Hi Chakradhar,
I didn't say you had to do it, only explained what it meant. EPC is a useful tool but like any automated check is never a full replacement for the experience and judgement of the developer.
That said, I don't think the fact the effort will be burdensome is alone justification for not considering the merits of addressing an EPC message.
Regards,
Nick
‎2014 Jun 26 1:06 PM
Hello,
Its not good recommendation, but if you do not want to spend that much time then suppress those warnings/error using #EC NEEDED or some other relevant # commands.
‎2014 Jun 26 1:59 PM
Hi Gaurav,
I did not want it to hide.Can you suggest me any another way.
Regards,
Chakradhar.
‎2014 Jun 26 3:45 PM
Then you might need to change all those numeric values to constant.
If possible, check the settings of EPC, and uncheck the check box which produces this result, but that could lead to other desirable error result to be ignored as well.