37 lines
723 B
Plaintext
37 lines
723 B
Plaintext
== Why is this an issue?
|
|
|
|
Paragraphs, sections and statements must be correctly indented for better code readability.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. foo.
|
|
|
|
PROCEDURE DIVISION.
|
|
IF "foo" = "bar" THEN
|
|
DISPLAY "foo = bar!" *> Noncompliant
|
|
ELSE
|
|
DISPLAY "foo <> bar!". *> Noncompliant
|
|
END PROGRAM foo.
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cobol]
|
|
----
|
|
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. foo.
|
|
|
|
PROCEDURE DIVISION.
|
|
IF "foo" = "bar" THEN
|
|
DISPLAY "foo = bar!"
|
|
ELSE
|
|
DISPLAY "foo <> bar!".
|
|
END PROGRAM foo.
|
|
----
|
|
|