title: Kotlin refer global variable from function
body: <p>Here is my code</p>
  
  <pre><code>var offset=0 //Global offset
  fun foo(){
      bar(offset)
  }
  
  fun bar(offset:Int){//Function argument offset
      .......
      .......
      .......
      if(baz()){
          .......
          .......
          offset+=10 // I want to update the global offset, but function argument offset is reffered here
          bar(offset)
      }
  }
  
  fun baz():Boolean{
      .......
      .......
  }
  </code></pre>
  
  <p>How can I refer to the global variable "offset" within the function bar(offset:Int)?
  Is it not possible in Kotlin?</p>