Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EPC

Former Member
0 Likes
1,684

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,278

You've defined a numerical literal 30 in your code, the Extended Program Check is recommending you replace this with a constant.

6 REPLIES 6
Read only

Former Member
0 Likes
1,279

You've defined a numerical literal 30 in your code, the Extended Program Check is recommending you replace this with a constant.

Read only

0 Likes
1,278

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.

Read only

0 Likes
1,278

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

Read only

Former Member
0 Likes
1,278

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.

Read only

0 Likes
1,278

Hi Gaurav,

I did not want it to hide.Can you suggest me any another way.

Regards,

Chakradhar.

Read only

Former Member
0 Likes
1,278

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.