21 lines
581 B
Plaintext
21 lines
581 B
Plaintext
Calling the ``+``, ``++-++`` or ``++NOT++`` prefix operator twice does nothing: the second invocation undoes the first. Such mistakes are typically caused by accidentally double-tapping the key in question without noticing.
|
|
|
|
|
|
Either this is a bug, if the operator was actually meant to be called once, or misleading if done on purpose.
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
IF NOT ( NOT foo = 5 ) THEN -- Noncompliant
|
|
value := ++1; -- Noncompliant
|
|
END IF;
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
IF foo = 5 THEN -- Compliant
|
|
value := +1; -- Compliant
|
|
END IF;
|
|
----
|