title: Why does VarType() ALWAYS return 8204 for Arrays
body: <p>In the <a href="https://msdn.microsoft.com/en-us/subscriptions/3kfz157h%28v=vs.84%29.aspx" rel="noreferrer"><code>VarType</code> MSDN</a> Microsoft documentation for VBScript's <code>VarType</code> function it says (With bold emphasis):</p>
  
  <blockquote>
    <p>"Remarks The VarType function never returns the value for Array by
    itself. It is always added to some other value to indicate an array of
    a particular type. The value for Variant is only returned when it has
    been added to the value for Array to indicate that the argument to the
    VarType function is an array. <strong>For example, the value returned for an
    array of integers is calculated as 2 + 8192, or 8194</strong>. If an object has
    a default property, VarType (object) returns the type of its default
    property."</p>
  </blockquote>
  
  <p>BUT</p>
  
  <p>Code such as</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim A,I1, I2, I3
  I1 = 1
  I2 = 2
  I3 = 3
  A = Array(I1,I2,I3)
  
  Dim A2
  A2 = Split("Test,Test,Test",",")
  
  AT = VarType(A)
  AT2 = VarType(A2)
  IT1 = VarType(I1)
  IT2 = VarType(I2)
  IT3 = VarType(I3)
  
  WScript.Echo IT1
  WScript.Echo IT2
  WScript.Echo IT3
  WScript.Echo AT &amp; " - 8192 = " &amp; AT - 8192
  WScript.Echo AT2 &amp; " - 8192 = " &amp; AT2 - 8192
  WScript.Echo CStr(VarType(A(2)))
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>2 
  2
  2
  8204 - 8192 = 12 
  8204 - 8192 = 12
  2
  </code></pre>
  
  <p><code>I1</code> - <code>I3</code> ALL return their proper <code>vbInteger</code> AND, when referenced individually in their array, ALSO return <code>vbInteger</code>, but the array insists it's an array of <code>vbVariant</code>.</p>
  
  <p>Unless I'm COMPLETELY missing something here it seems that in SPITE of the documentation there is no way to create an array where the items are ALL of the SAME type and have <code>VarType</code> recognize it as as anything but an array of <code>vbVariant</code>.</p>
  
  <p>I feel like this should already be a question but i came up empty searching through here so feel free to link if I missed the existing questions.</p>