Goto/de: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Goto/de
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Zurück zu den [[Reserved words/de|reservierten Wörtern]]. | |
| 2 | + | ||
| 3 | + | Das reservierte Wort <b>goto</b> gehört zu den Sprungbefehlen. | |
| 4 | + | ||
| 5 | + | Mit goto springt das Programm zu einer festgelegten Markierung (label, Sprungmarke) und arbeitet ab dieser Markierung weiter. | |
| 6 | + | ||
| 7 | + | Siehe auch [[Label/de|Label]]. | |
| 8 | + | ||
| 9 | + | Beispiel für Deklaration einer Sprungmarke und der Verwendung des Sprungbefehls: | |
| 10 | + | ||
| 11 | + | ``` pascal | |
| 12 | + | var | |
| 13 | + | blnWahr: Boolean; | |
| 14 | + | ||
| 15 | + | label | |
| 16 | + | Sprungmarke; | |
| 17 | + | ||
| 18 | + | begin | |
| 19 | + | ... | |
| 20 | + | if blnWahr = True then Goto Sprungmarke; | |
| 21 | + | ... | |
| 22 | + | Sprungmarke: | |
| 23 | + | ... | |
| 24 | + | end; | |
| 25 | + | ``` | |
| 26 | + | ||
| 27 | + | \ | |
| 28 | + | \ | |
| 29 | + | Wen der Kompiler bei **Goto** motz, muss man diese Funktion aktivieren, entweder mit dem Kommandozeilenparameter **-Sg**, oder direkt in der Source mit: | |
| 30 | + | ||
| 31 | + | ``` pascal | |
| 32 | + | {$goto on} // Goto möglich | |
| 33 | + | {$goto off} // Goto nicht möglich | |
| 34 | + | ``` | |
| 35 | + | ||
| 36 | + | --- | |
| 37 | + | *From the Free Pascal wiki, page "Goto/de", as it stood on 2020-02-16 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
