== Why is this an issue?

When multiple variables are ``++DECLARE++``d in a single statement, parentheses must be used around the variable list to ensure the variable attributes in the statement are applied to all the variables in the declaration. Without parentheses, the attributes are applied only to the last variable in the list.


=== Noncompliant code example

[source,pli]
----
DECLARE X,Y FIXED BIN(15);
----


=== Compliant solution

[source,pli]
----
DECLARE (X,Y) FIXED BIN(15);
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Add parentheses around this variable list; only "x" has the desired type.


=== Highlighting

variable list. E.G. ``++X,Y++`` in: ``++DECLARE X,Y FIXED BIN(15);++``


'''
== Comments And Links
(visible only on this page)

=== on 25 Apr 2017, 18:02:44 Pierre-Yves Nicolas wrote:
\[~ann.campbell.2] Is it a bug or a code smell?

If we are careful about potential noise, I think we should either:

* raise issues in all cases and consider this rule as a code smell
* only raise issues when the intent of the developer is clearly not what the code does and consider the rule as a bug

If we go for the 2nd option, we can maybe check how the code is formatted:

----
DECLARE X,Y FIXED BIN(15); // Noncompliant
DECLARE 
 X,
 Y FIXED BIN(15); // compliant
----


=== on 25 Apr 2017, 18:08:15 Ann Campbell wrote:
\[~pierre-yves.nicolas] I honestly don't know. I suspect that with or without linebreaks, it's not the developer's intent, but my plan was to implement & evaluate.

endif::env-github,rspecator-view[]
