Sign in Join
Wiki copytemporary

Addr/de

Deutsch · English

Addr

Ermittelt die Adresse einer Variablen.

Beispiel

pascal
var
  i: Integer;
  p: Pointer;
begin
  i := 500;
  p := Addr(i);

  WriteLn(Integer(p^));
  WriteLn('"a" befindet sich an folgender Adresse: ', PtrInt(p));
end.

Alternative Schreibweise

Anstelle von Addr(..) kann man auch ein @ nehmen.

Folgendes macht das Gleiche.

pascal
  p := Addr(i);
  p := @i;

Wobei man mit @ auch Adressen von Prozeduren und Funktionen ermitteln kann.

Siehe auch

Pointer

Autor: Mathias


From the Free Pascal wiki, page "Addr/de", as it stood on 2020-01-19 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.

Revision 1, last changed by WikiArchive .

Talk about this page

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