title: Convert string to integer .asp classic
body: <p>I have the following code, comments detail what should happen:</p>
  
  <pre class="lang-vb prettyprint-override"><code>averageNum = myArray2(0) 'assign variable
  response.write(TypeName(averageNum)&amp;"&lt;br&gt;") 'check var type: string as expected
  averageNum = CInt(averageNum) 'convert to integer
  </code></pre>
  
  <p>When I run this is I get</p>
  
  <pre>Type mismatch: 'CInt'</pre>
  
  <p>I need to turn the variable into an integer as I need to perform calculations with it</p>