Break/de: what changed
Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | - | ||
| 2 | - | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - | ||
| 6 | - | ||
| 7 | - | ||
| 1 | + | Zurück zu den [[Reserved words/de|reservierten Wörtern]].\ | |
| 8 | 2 | ||
| 9 | - | ||
| 3 | + | Das reservierte Wort **break** gehört zu den [[Loops/de|Schleifenbefehlen]].\ | |
| 4 | + | Der Befehl dient dazu, eine Schleife vor ihrem geplanten Ende zu verlassen.\ | |
| 5 | + | Der Befehl break kann nur innerhalb von Schleifen verwendet werden.\ | |
| 6 | + | ||
| 7 | + | Beispiel:\ | |
| 8 | + | ||
| 9 | + | ``` pascal | |
| 10 | 10 | var | |
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 11 | + | intI: Integer; | |
| 12 | + | intA: Integer = 50; | |
| 13 | + | begin | |
| 14 | + | for intI := 20 to 200 do | |
| 15 | + | begin | |
| 16 | + | ... | |
| 17 | + | if intI = intA then break; // wenn die Bedingung erfüllt ist, wird die Schleife vorzeitig beendet | |
| 18 | + | ... | |
| 19 | + | end; | |
| 20 | + | end; | |
| 21 | 21 | ``` | |
| 22 | 22 | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 23 | + | --Olaf 17:11, 24 October 2012 (UTC) | |
| 26 | 24 | ||
| 27 | 25 | --- | |
| 28 | - | ||
| 26 | + | *From the Free Pascal wiki, page "Break/de", as it stood on 2020-01-17 after a change by Bart, 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).* | |
| 27 | + | Category: Reserved words/de |
