49 lines
868 B
Plaintext
49 lines
868 B
Plaintext
Initializing an alphanumeric field with the literal character ``++' '++``, ``++'1'++``, or ``++'0'++`` has the same effect as using the equivalent figurative constant ``++*BLANK++``, ``++*ON++``, or ``++*OFF++``, but the constant version removes ambiguity and makes the code more readable.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,rpg]
|
|
----
|
|
C MOVE ' ' FLD1
|
|
----
|
|
|
|
[source,rpg]
|
|
----
|
|
/free
|
|
fld1 = ' ';
|
|
/end-free
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,rpg]
|
|
----
|
|
C MOVE *BLANK FLD1
|
|
----
|
|
|
|
[source,rpg]
|
|
----
|
|
/free
|
|
fld1 = *BLANK;
|
|
/end-free
|
|
----
|
|
|
|
|
|
|
|
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[]
|