GeekArticles
Programming
Delphi
Programming
DelphiUnderstanding and (Not) Using the Goto Delphi Statement
<p><a TIPS</i></a> ::</p>
<div 1px />
<b>var</b><br />
  <b>label</b> : nastyJump;<br />
<br />
<b>begin</b><br />
 Some_Code_Here;<br />
<b>nastyJump:</b><br />
 Some_More_Code_Here;<br />
<b>goto</b> nastyJump;<br />
<b>end</b>;<br />
</a></div>
<p> The Goto statement transfers program execution to the statement marked by the specified label. </p>
<p>Read this again! Goto does not it simply forces a jump to some other location in the code block. When badly used Goto could transform your code into a non-readable piece of junk. </p>
<p>Be it bad or good, Goto is in Delphi and you might need to use it, or at least need to understand how it works. </p>
<p>Read the full tip to <b><a how Goto can be used, and when it should not be used</a></b></p>
<p><b>Related:</b> <a Are you using the Goto statement in Delphi?</a> | <a I (Almost) Ended Up Using Goto in Delphi code</a> | <a flow control routines (Abort, Break, Continue, Exit)</a></p>
<p 1px solid and (Not) Using the Goto Delphi Statement</a> originally appeared on <a Delphi Programming</a> on Monday, October 12th, 2009 at 02:00:53.</p><p><a | <a | <a and (Not) Using the Goto Delphi this</a></p>
Sponsored Links
Related Topics
Subscribe via RSS
Delphi
- A load of ASP.NET related tutorials, articles, tips and tricks!
- How to move PageControl's tabs using drag'n'drop
- Charts in database applications
- Creating Components Dynamically (at Run-Time)
- The role of the "AOwner" parameter in the Create constructor
- Creating a roll up form (with animation)
- Poll: Do you already have some experience with Delphi?
- Creating a database from Delphi code
- TMemoBar - T(Custom)Memo extender
- How to click-and-select a line in TMemo
