Program/de: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Program/de
| Old | New | Line | |
|---|---|---|---|
| 1 | + | # Program | |
| 2 | + | ||
| 3 | + | ## Beschreibung | |
| 4 | + | ||
| 5 | + | Zurück zu den [[Reserved words/de|reservierten Wörtern]]. | |
| 6 | + | ||
| 7 | + | Das reservierte Wort **program** steht am Anfang eines Programms und enthält den Namen des Programms, dieser muss **nicht** mit dem Datei-Namen des Programmes übereinstimmen. | |
| 8 | + | ||
| 9 | + | Die Datei hat in der Regel die Datei-Extension **.pas*', es ist aber eine x-beliebige Extension möglich. | |
| 10 | + | ||
| 11 | + | In Lazarus ist es zB.***.lpr**. | |
| 12 | + | ||
| 13 | + | Die Zeile mit **program** kann auch weggelassen werden, aber dies ist nicht üblich. | |
| 14 | + | ||
| 15 | + | ## Beispiele | |
| 16 | + | ||
| 17 | + | ``` pascal | |
| 18 | + | program HelloWorld; | |
| 19 | + | uses | |
| 20 | + | Crt; | |
| 21 | + | ||
| 22 | + | begin | |
| 23 | + | WriteLn('Hello World'); | |
| 24 | + | end. | |
| 25 | + | ``` | |
| 26 | + | ||
| 27 | + | Es ist auch eine Parameterliste möglich, die von der Shell (egal ob sichtbare oder unsichtbare Shell) des Betriebssystems entgegengenommen wird. | |
| 28 | + | ||
| 29 | + | ``` pascal | |
| 30 | + | program HelloWorld(input, output, stderr); | |
| 31 | + | begin | |
| 32 | + | WriteLn('Hello World'); | |
| 33 | + | end. | |
| 34 | + | ``` | |
| 35 | + | ||
| 36 | + | --- | |
| 37 | + | *From the Free Pascal wiki, page "Program/de", as it stood on 2020-01-14 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).* | |
| 38 | + | Category: Reserved words/de |
