function foo
  var Int i := 3
  thread
    console "i = " i eol

In this example, the 'i' variable value is automatically passed to the new thread.