Tech Tutorials Database
GeekArticles Programming Delphi
 

Understanding and (Not) Using the Goto Delphi Statement

 
Author: delphi.about.com
Category: Delphi
Comments (0)

<p><a TIPS</i></a> ::</p> <div 1px /> <b>var</b><br /> &#160;&#160;<b>label</b> : nastyJump;<br /> <br /> <b>begin</b><br /> &#160;Some_Code_Here;<br /> <b>nastyJump:</b><br /> &#160;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> &#124; <a I (Almost) Ended Up Using Goto in Delphi code</a> &#124; <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>

Read More...




Sponsored Links




Read Next: Allow Only One Application Execution per Windows Session



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe