title: Change var globaly in swift
body: <p>I want to change the value of a var in a swift file that i create: </p>
  
  <pre><code>class functions {
  
      var DataSent = "Sensor"
  
      func setValue (DataSent: String) {
        self.DataSent =  DataSent
      }
  
      func getValue () -&gt; String {
          return self.DataSent
      }
  
  
  }
  </code></pre>
  
  <p>when i call setValue the DataSent doesn't change what can i do?</p>
  
  <p>i call it like that: </p>
  
  <pre><code>functions().setValue(stringData)
  </code></pre>
  
  <p>and then i call it to another class with getValue</p>