rspec/rules/S907/rpg/rule.adoc
2022-02-04 16:28:24 +00:00

26 lines
635 B
Plaintext

``++GOTO++`` is an unstructured control flow statement. It makes code less readable and maintainable, and should only be used to branch to defined ``++ENDSR++`` points within the source. For normal loop functions use ``++ITER++`` or ``++LEAVE++`` instead.
== Noncompliant Code Example
[source,rpg]
----
C LOOP1 TAG
...
C GOTO LOOP1
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]