From Lazarus wiki
Revision as of 23:52, 19 January 2020 by Trev (talk | contribs) (English translation of German page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Deutsch (de) English (en)


Determines the address of a variable.


   i : integer;
   p : pointer;
   i := 500;
   p := Addr(i);

   WriteLn(Integer(p^)) ;
   WriteLn('"a" is at the following address:', PtrInt(p));


You can use @ instead of Addr(...).

The two examples below do the same thing.

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

Where @ can also be used to determine the addresses of procedures and functions.

See also

navigation bar: data types
simple data types

boolean byte cardinal char currency double dword extended int8 int16 int32 int64 integer longint real shortint single smallint pointer qword word

complex data types

array class object record set string shortstring