Content
192 EXERCISES SECTION 5.5.2 (. 190 , only for duplicated words that start with an uppercase letter. 5.5.3 The goto Statement A goto statement provides an unconditional jump from the goto to Best Programs should not use gotos. gotos make programs hard to u stand and hard to modify. mant 18 goto label; where label is an identifier that identifies a statement. A labeled statement isany statement that is preceded by an identifier followed by a colon: end: return; labeled statement; may be the target of a goto Label identifiers are independent of names used for variables and other identifiers. Hence, a label may have the same identifier as another entity in the program with out interfering with the other uses of that identifier. The goto and the labeled statement to which it transfers control must be in the same function. As with a switch statement, a goto cannot transfer control from a point where an initialized variable is out of scope to a point where that variable is in scope: goto end; end: int ix 10; error: goto bypasses an initialized variable definition ix 42; error: code here could use ix but the got o bypassed its declaration 4 jump backward over an already executed definition is okay. Jumping bask loa pon-before a variables defined escued definition is okay lump liger I backward jump over an initialized variable definition is okay begin: int sz getsize (); if (sz 0) goto begin; Here an is destroved when the ante event. when control naccos hast. . a anew