CRITICAL
Rule Definition
More than one declaration mustn't be declared for the same record in the same application. Otherwise, declaration that has the value will be null.
This is not checked by the EGL compiler unfortunatelly…
Remediation
Try to reduce the number of overrride record declarations with a duplicate declaration.
Violation Code Sample
program testViolation (REC1 REC1, REC2 REC2)
REC3 REC3;
REC1 RECn; // violation : REC1 declaration erase input parameter…
also in functions inside the program:
function test1 ()
{
REC1 RECn; // violation : REC1 declaration erase input parameter…
}
also in "external" functions called by the program.
function test1_test ()
{
REC1 RECn; // violation : REC1 declaration erase input parameter…
}
Fixed Code Sample
program testCorrection (REC1 REC1, REC2 REC2)
REC3 REC3;
RECnew RECn // remediation : RECn does not erase with any input parameter…
also in functions inside the program:
function test1 ()
{
RECnew RECn; // remediation : RECn does not erase with any input parameter…
}
also in "external" functions called by the program.
function test1_test ()
{
RECnew RECn; // remediation : RECn does not clash with any input parameter…
}
Related Technologies
Technical Criterion
Programming Practices - Unexpected Behavior
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.