$typedAddress/de: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: $typedAddress/de
| Old | New | Line | |
|---|---|---|---|
| 1 | + | \ | |
| 2 | + | Zurück zu den [[local compiler directives/de|lokalen Compilerdirektiven]] | |
| 3 | + | ||
| 4 | + | ## \$TYPEDADDRESS und \$T | |
| 5 | + | ||
| 6 | + | Die Compilerdirektive \$TYPEDADDRESS und \$T sind in Ihrer Verwendung Synonym.\ | |
| 7 | + | Die Compilerdirektive \$TYPEDADDRESS, legt fest, ob der Operator @ (Adressoperator) einen typisierten oder einen untypisierten Pointer zurück gibt.\ | |
| 8 | + | Die Compilerdirektive \$T kennt zwei Schalter + und -.\ | |
| 9 | + | Die Compilerdirektive \$TYPEDADDRESS kennt zwei Schalter ON und OFF.\ | |
| 10 | + | \ | |
| 11 | + | Beispiel für einen Fehler: | |
| 12 | + | ||
| 13 | + | {$T+} // schaltet den typisierten Pointer ein | |
| 14 | + | ||
| 15 | + | Var | |
| 16 | + | I : Integer; | |
| 17 | + | P : PChar; | |
| 18 | + | ||
| 19 | + | begin | |
| 20 | + | P:=@I; | |
| 21 | + | // Der Compiler gibt folgende Fehlermeldung aus: | |
| 22 | + | // ... : Incompatible types: got "^SmallInt" expected "PChar" | |
| 23 | + | end. | |
| 24 | + | ||
| 25 | + | \ | |
| 26 | + | In der Standardeinstellung übergibt der Adressoperator einen untypisierten Pointer.\ | |
| 27 | + | \ | |
| 28 | + | Beispiel: | |
| 29 | + | ||
| 30 | + | {$T-} // Die Standardeinstellung schaltet den typisierten Pointer aus | |
| 31 | + | ||
| 32 | + | Var | |
| 33 | + | I : Integer; | |
| 34 | + | P : PChar; | |
| 35 | + | ||
| 36 | + | begin | |
| 37 | + | P:=@I; | |
| 38 | + | // Der Compiler gibt keine Fehlermeldung aus | |
| 39 | + | end. | |
| 40 | + | ||
| 41 | + | \ | |
| 42 | + | \ | |
| 43 | + | --Olaf 09:05, 25 January 2013 (UTC) | |
| 44 | + | ||
| 45 | + | --- | |
| 46 | + | *From the Free Pascal wiki, page "$typedAddress/de", as it stood on 2023-03-05 after a change by Kai Burghardt, 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).* | |
| 47 | + | Category: Free Pascal Programmers Guide/de |
