title: Replacement for goto statement in Swift
body: <p>How can I transfer control to a specific line in Swift code?</p>
  
  <p>In Objective-C I would do something like the following, using <code>goto</code></p>
  
  <pre><code>if(a==b)
  {
      goto i123;
  }
  else
  {
      goto i456;
  }
  NSLog(@"the not reachable point");
  i123:
  NSLog(@"line 123 is here");
  int j = 5;
  int x = 2+j;
  i456:
  NSLog(@"line 456 is here");
  </code></pre>
  
  <p>The only control transfer statements in Swift I could find were <code>continue</code>, <code>break</code>, <code>fallthrough</code>, and <code>return</code></p>
  
  <p><code>continue</code> and <code>break</code> only work with loops; <code>return</code> and <code>fallthrough</code> don't transfer control this way.</p>
  
  <p>What can I use?</p>
  
  <p><strong>EDIT:-</strong></p>
  
  <p>Julien__'s answer didn't actually solve my problem but it could be the only available option right now. so i have accepted the answer by Julien__</p>