rspec/rules/S1650/vb6/rule.adoc
2022-02-04 16:28:24 +00:00

31 lines
614 B
Plaintext

Appending '$' to any identifier forces it to the String data type, but this usage is obsolete and should only appear when differentiating string-specific functions from variant functions, such as ``++Left$()++`` versus ``++Left()++``.
Instead, Strings should be explicitly declared with the String datatype.
== Noncompliant Code Example
[source,vb6]
----
Dim Text$ As String
----
== Compliant Solution
[source,vb6]
----
Dim Text As String
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]