rspec/rules/S1702/vb6/rule.adoc

16 lines
458 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Variables declared without the explicit specification of a data type are ``++Variants++``. Variants can be inefficient to use because at each interaction they are converted to the appropriate type for that interaction. Variants may be required for COM interactions, but even then their type should be specified explicitly.
== Noncompliant Code Example
----
Dim Count
Dim Bool
----
== Compliant Solution
----
Dim Count As Integer
Dim Bool As Boolean
----