title: Performing arithmetic on string values
body: <p>I would like to ask something about data types in Lua.
  I get from serial link some message (command:value) like this:</p>
  
  <pre><code>tmp_string = "BRAKE:1"
  </code></pre>
  
  <p>then I parse this string to command and value in two different functions (one is for command and other one is for value). This is function for parsing value</p>
  
  <pre><code>function parser(value)
      index = string.find(value, ":")
      result = value.sub(value, index+1)
      return result
  end
  </code></pre>
  
  <p>I would like to now what sort of data type result is? If I use string match it works.</p>
  
  <pre><code>...if string.match(state, "1") then...
  </code></pre>
  
  <p>However it also works when I do something like this</p>
  
  <pre><code>x = (state*65536)/3.2808)
  </code></pre>
  
  <p>I thought the result is string, but I don't understand why it works also with numerical operations. Thank you in advance. </p>