$include/de: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## \$I oder \$INCLUDE | |
| 2 | 2 | ||
| 3 | 3 | Die Direktive \$INCLUDE oder \$I dient dem Einfügen einer Datei.\ | |
| 4 | 4 | Die Direktive \$INCLUDE oder \$I fügt an der Stelle an der die Anweisung steht eine Datei ein.\ | |
| 5 | 5 | Falls die einzufügende Datei keine Dateiendung hat, dann sucht der Compiler nach einer Datei mit der Endung .pp.\ | |
| 6 | 6 | Die Anzahl der einzufügenden Dateien ist auf die Anzahl der verfügbaren file descriptors des Free Pascal Compilers beschränkt.\ | |
| 7 | - | ||
| 7 | + | ||
| 8 | 8 | Beispiel:\ | |
| 9 | 9 | ||
| 10 | 10 | ``` pascal | |
| 11 | 11 | {$INCLUDE test1.pas} // sucht im aktuellen Verzeichnis nach der Datei test1.pas | |
| 12 | 12 | {$INCLUDE ../test2.pas} // sucht im übergeordneten Verzeichnis nach der Datei test2.pas | |
| 13 | 13 | ``` | |
| 14 | 14 | ||
| 15 | 15 | ## \$I und \$INCLUDE | |
| 16 | 16 | ||
| 17 | 17 | Die Direktiven \$I und \$INCLUDE haben die gleiche Bedeutung.\ | |
| 18 | 18 | Die Direktiven \$I und \$INCLUDE unterstützen die gleichen Bezeichner.\ | |
| 19 | - | ||
| 20 | - | ||
| 21 | 19 | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 20 | + | Die Direktiven kennen folgende Bezeichner:\ | |
| 27 | 21 | ||
| 28 | 22 | TIME | |
| 29 | 23 | ||
| 30 | - | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 34 | 24 | Gibt das aktuelle Datum und die aktuelle Zeit aus. | |
| 35 | 25 | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | 26 | DATE | |
| 45 | 27 | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - | ||
| 50 | 28 | Fügt das aktuelle Datum ein. | |
| 51 | 29 | ||
| 52 | - | ||
| 53 | - | ||
| 54 | - | ||
| 55 | - | ||
| 56 | - | ||
| 57 | - | ||
| 58 | - | ||
| 59 | - | ||
| 60 | 30 | FPCTARGET | |
| 61 | 31 | ||
| 62 | - | ||
| 63 | - | ||
| 64 | - | ||
| 65 | - | ||
| 66 | 32 | Fügt den Namen des Zielprozessors ein. Dieser Bezeichner ist deprecated (hinfällig). Der neue Bezeichner heisst FPCTARGETCPU. | |
| 67 | 33 | ||
| 68 | - | ||
| 69 | - | ||
| 70 | - | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | 34 | FPCTARGETCPU | |
| 77 | 35 | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - | ||
| 81 | - | ||
| 82 | 36 | Fügt den Namen des Zielprozessors ein. | |
| 83 | 37 | ||
| 84 | - | ||
| 85 | - | ||
| 86 | - | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - | ||
| 91 | - | ||
| 92 | 38 | FPCTARGETOS | |
| 93 | 39 | ||
| 94 | - | ||
| 95 | - | ||
| 96 | - | ||
| 97 | - | ||
| 98 | 40 | Fügt den Namen des Zielbetriebsystems ein. | |
| 99 | 41 | ||
| 100 | - | ||
| 101 | - | ||
| 102 | - | ||
| 103 | - | ||
| 104 | - | ||
| 105 | - | ||
| 106 | - | ||
| 107 | - | ||
| 108 | 42 | FPCVERSION | |
| 109 | 43 | ||
| 110 | - | ||
| 111 | - | ||
| 112 | - | ||
| 113 | - | ||
| 114 | 44 | Fügt die aktuelle Compilerversion ein. | |
| 115 | 45 | ||
| 116 | - | ||
| 117 | - | ||
| 118 | - | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - | ||
| 122 | - | ||
| 123 | - | ||
| 124 | 46 | FILE | |
| 125 | 47 | ||
| 126 | - | ||
| 127 | - | ||
| 128 | - | ||
| 129 | - | ||
| 130 | 48 | Dateiname, in der die Direktive steht. | |
| 131 | 49 | ||
| 132 | - | ||
| 133 | - | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - | ||
| 138 | - | ||
| 139 | - | ||
| 140 | 50 | LINE | |
| 141 | 51 | ||
| 142 | - | ||
| 143 | - | ||
| 144 | - | ||
| 145 | - | ||
| 146 | 52 | Nummer der Zeile, in der die Direktive steht. | |
| 147 | 53 | ||
| 148 | - | ||
| 149 | - | ||
| 150 | - | ||
| 151 | - | ||
| 152 | - | ||
| 153 | - | ||
| 154 | - | ||
| 155 | - | ||
| 156 | 54 | CURRENTROUTINE | |
| 157 | 55 | ||
| 158 | - | ||
| 159 | - | ||
| 160 | - | ||
| 161 | - | ||
| 162 | 56 | Name der aktuellen Routine. | |
| 163 | 57 | ||
| 164 | - | ||
| 165 | - | ||
| 166 | - | ||
| 167 | - | ||
| 168 | - | ||
| 169 | - | ||
| 170 | 58 | Andere Bezeichner werden aus den Umgebungsvariablen des Compiler Prozesses genommen.\ | |
| 171 | 59 | Beispiel: | |
| 172 | 60 | ||
| 173 | 61 | ``` pascal | |
| 174 | 62 | Program InfoDemo; | |
| 175 | 63 | begin | |
| 176 | 64 | WriteLn('Compilierzeit: ' + {$I %TIME%}); | |
| 177 | 65 | WriteLn('Compilierdatum: ' + {$I %DATE%}); | |
| 178 | 66 | WriteLn('Erforderliche CPU: ' + {$I %FPCTARGETCPU%}); | |
| 179 | 67 | WriteLn('Erforderliche CPU (veraltet): ' + {$I %FPCTARGET%}); | |
| 180 | 68 | WriteLn('Betriebssystem: ' + {$I %FPCTARGETOS%}); | |
| 181 | 69 | WriteLn('FPC Version: ' + {$I %FPCVERSION%}); | |
| 182 | 70 | WriteLn('Name der Datei: ' + {$I %FILE%}); | |
| 183 | 71 | WriteLn('Aktuelle Zeile als String: ' + {$I %LINE%}); | |
| 184 | 72 | WriteLn('Aktuelle Zeile als Int: ' + IntToStr({$I %LINENUM%})); | |
| 185 | 73 | WriteLn('Compilierer: ' + {$I %USER%}); | |
| 186 | 74 | WriteLn('Home-Ordner des Benutzers: ' + {$I %HOME%}); | |
| 187 | 75 | WriteLn('Name der aktuellen Routine: ' + {$I %CURRENTROUTINE%}); | |
| 188 | 76 | end. | |
| 189 | 77 | ``` | |
| 190 | 78 | ||
| 191 | - | ||
| 192 | - | ||
| 193 | - | ||
| 79 | + | Hinweis: Für Infos über Lazarus, kann die Unit LCLVersion eingebunden werden. | |
| 194 | 80 | ||
| 195 | 81 | --- | |
| 196 | 82 | *From the Free Pascal wiki, page "$include/de", as it stood on 2022-04-09 after a change by PascalDragon, 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).* |
