Sign in Join
Wiki copytemporary

$typedAddress/de

Zurück zu den lokalen Compilerdirektiven

$TYPEDADDRESS und $T

Die Compilerdirektive $TYPEDADDRESS und $T sind in Ihrer Verwendung Synonym.
Die Compilerdirektive $TYPEDADDRESS, legt fest, ob der Operator @ (Adressoperator) einen typisierten oder einen untypisierten Pointer zurück gibt.
Die Compilerdirektive $T kennt zwei Schalter + und -.
Die Compilerdirektive $TYPEDADDRESS kennt zwei Schalter ON und OFF.\

Beispiel für einen Fehler:

pascal
{$T+} // schaltet den typisierten Pointer ein
pascal
Var
  I : Integer;
  P : PChar;
pascal
begin
  P:=@I;
  // Der Compiler gibt folgende Fehlermeldung aus:
  // ... : Incompatible types: got "^SmallInt" expected "PChar" 
end.

In der Standardeinstellung übergibt der Adressoperator einen untypisierten Pointer.\

Beispiel:

pascal
{$T-} // Die Standardeinstellung schaltet den typisierten Pointer aus
pascal
Var
  I : Integer;
  P : PChar;
pascal
begin
  P:=@I;
  // Der Compiler gibt keine Fehlermeldung aus
end.

--Olaf 09:05, 25 January 2013 (UTC)


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.

Revision 3, last changed by WikiArchive .

Edited on wiki.freepascal.org by 3 people, 2013–2023

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
OlafCreated page
Olaf (minor)
Olaf (minor)
Swen (minor)
Olaf (minor)
Swen (minor)
Kai BurghardtKai Burghardt moved page sTypedadress/de to $typedAddress/de: spelling mistake: “address” is spelled with double-D (minor)
Kai Burghardttake note of move (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.