
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
30 lines
774 B
Plaintext
30 lines
774 B
Plaintext
== Why is this an issue?
|
|
|
|
Both the "{plus}" operator and the "&" operator can be used to concatenate strings. However, there is a complicated set of rules around the actual behavior of the "+" operator, and whether you will get a concatenation operation, addition, a compiler error, or a ``++Type mismatch++`` error. On the other hand, the "&" operator can only perform concatenation, and is therefore preferred.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,vb6]
|
|
----
|
|
Dim y As String = "Con" + "caten" + "ation"
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,vb6]
|
|
----
|
|
Dim y As String = "Con" & "caten" & "ation"
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|