title: What exactly does `return` do in AutoHotKey?
body: <p><a href="https://stackoverflow.com/questions/70235074/how-to-send-a-block-of-text-line-by-line-in-a-hotstring#comment124158382_70235655">In a comment chain</a>, I ask:</p>
  <blockquote>
  <p>Hmm, so the <code>return</code> doesn't play like a closing bracket like in other languages?</p>
  </blockquote>
  <p>To which a user answers:</p>
  <blockquote>
  <p>It's maybe easy to think of <code>return</code> as just something that stops the code execution from going further. #IfDirectives don't care about <code>return</code>s, or anything else related to code execution, because they have nothing to do with code execution. They are kind of just markers that enclose different parts of code within them</p>
  </blockquote>
  <p>I have two questions from this:</p>
  <ol>
  <li><p>If <a href="https://www.autohotkey.com/docs/commands/Return.htm" rel="nofollow noreferrer" title="Return - Syntax &amp; Usage | AutoHotkey"><code>return</code></a> is just something that stops code execution from going further, then how is it different to <a href="https://www.autohotkey.com/docs/commands/Exit.htm" rel="nofollow noreferrer" title="Exit - Syntax &amp; Usage | AutoHotkey"><code>exit</code></a>? They are both flow controls playing a role to determine <a href="https://www.autohotkey.com/docs/Scripts.htm#auto" rel="nofollow noreferrer" title="Scripts - Definition &amp; Usage | AutoHotkey">The Top of the Script (the Auto-execute Section)</a>. I see that many people having this problem.</p>
  </li>
  <li><p>If <code>return</code> doesn't play like a closing bracket, then why does it appear in many places one expects a closing bracket? Especially when there is no subroutine involving in, like what is described in the formal definition. Take this example in <a href="https://www.autohotkey.com/docs/Hotkeys.htm" rel="nofollow noreferrer" title="Hotkeys - Definition &amp; Usage | AutoHotkey">Hotkeys</a>:</p>
  <pre class="lang-c prettyprint-override"><code>#n::
  Run Notepad
  return
  </code></pre>
  </li>
  </ol>