49 lines
842 B
Plaintext
49 lines
842 B
Plaintext
88-level variables, also known as "condition name" variables, represent possible values of the "conditional variables" they're tied to. An unused "condition name" variable is dead code. Such variables should be removed to increase the maintainability of the program.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
01 COLOR PIC X.
|
|
88 COL-YELLOW VALUE 'Y'.
|
|
88 COL-GREEN VALUE 'G'. *> Noncompliant; not used
|
|
88 COL-RED VALUE 'R'.
|
|
|
|
* ...
|
|
IF COL-YELLOW
|
|
* ...
|
|
END-IF
|
|
IF COL-RED
|
|
* ...
|
|
END-IF
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
01 COLOR PIC X.
|
|
88 COL-YELLOW VALUE 'Y'.
|
|
88 COL-RED VALUE 'R'.
|
|
|
|
* ...
|
|
IF COL-YELLOW
|
|
* ...
|
|
END-IF
|
|
IF COL-RED
|
|
* ...
|
|
END-IF
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|