20 lines
235 B
Plaintext
20 lines
235 B
Plaintext
Chained assignments are confusing and hard to read, and should be avoided.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,text]
|
|
----
|
|
x = y = 0; // Noncompliant
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,text]
|
|
----
|
|
x = 0;
|
|
y = 0; // or y = x;
|
|
----
|
|
|