title: Do / while loop declaration and other errors
body: <p>I am having a problem trying to implement this basic do while loop.</p>
  
  <p>I keep getting an error saying</p>
  
  <blockquote>
    <p>"statements are not allowed at the top level" </p>
  </blockquote>
  
  <p>or another error (which highlights the word "do") saying </p>
  
  <blockquote>
    <p>"expected declaration"</p>
  </blockquote>
  
  <p>I have checked the swift programming guide, and read through the relevant sections numerous times. I have also watched  every video I can find but just can not seem to figure out exactly what I am doing wrong. </p>
  
  <p>here is the code.</p>
  
  <pre><code>//  loop.swift
  
  import Foundation
  
  var i = 17
  
  do
  {
     println("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16")
  } while (i &lt; 16)
  </code></pre>